diff options
| author | Sangeun Kim <sammy.kim@samsung.com> | 2013-05-16 15:31:25 +0900 |
|---|---|---|
| committer | Sangeun Kim <sammy.kim@samsung.com> | 2013-05-16 15:31:25 +0900 |
| commit | ba9668ed06f255160ec7835e913e29850a3e2b20 (patch) | |
| tree | b6b3e1e68bedcccb92b83226bc9fd174aa645d59 | |
| parent | 70a19d5f631bd06102432ad132ec89295aa8b3ff (diff) | |
| download | rust-ba9668ed06f255160ec7835e913e29850a3e2b20.tar.gz rust-ba9668ed06f255160ec7835e913e29850a3e2b20.zip | |
Add a test for bytes!
| -rw-r--r-- | src/test/run-pass/syntax-extension-bytes.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/syntax-extension-bytes.rs b/src/test/run-pass/syntax-extension-bytes.rs new file mode 100644 index 00000000000..9249267355d --- /dev/null +++ b/src/test/run-pass/syntax-extension-bytes.rs @@ -0,0 +1,16 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let vec = bytes!("abc"); + assert_eq!(vec[0], 97); + assert_eq!(vec[1], 98); + assert_eq!(vec[2], 99); +} |
