diff options
| author | Derek Guenther <dguenther9@gmail.com> | 2014-02-11 17:03:59 -0600 |
|---|---|---|
| committer | Derek Guenther <dguenther9@gmail.com> | 2014-02-11 17:03:59 -0600 |
| commit | 0465fd7fae9caf87e2e63ee255fbb54e7a269915 (patch) | |
| tree | 469bbd1c08347c7804fd0d7fa165ba552ae9fc3d /src/libfourcc/lib.rs | |
| parent | 4c967e70414cad67e4cd28a9fd2cc267ccf85da9 (diff) | |
| download | rust-0465fd7fae9caf87e2e63ee255fbb54e7a269915.tar.gz rust-0465fd7fae9caf87e2e63ee255fbb54e7a269915.zip | |
Fixed fourcc example doc
Diffstat (limited to 'src/libfourcc/lib.rs')
| -rw-r--r-- | src/libfourcc/lib.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libfourcc/lib.rs b/src/libfourcc/lib.rs index ea82d31bbe7..df693bd1d8b 100644 --- a/src/libfourcc/lib.rs +++ b/src/libfourcc/lib.rs @@ -26,10 +26,10 @@ To load the extension and use it: extern mod fourcc; fn main() { - let val = fourcc!("\xC0\xFF\xEE!") - // val is 0xC0FFEE21 - let big_val = fourcc!("foo ", big); - // big_val is 0x21EEFFC0 + let val = fourcc!("\xC0\xFF\xEE!"); + assert_eq!(val, 0xC0FFEE21u32); + let little_val = fourcc!("foo ", little); + assert_eq!(little_val, 0x21EEFFC0u32); } ``` @@ -60,7 +60,6 @@ use syntax::parse::token; use syntax::parse::token::InternedString; #[macro_registrar] -#[cfg(not(test))] pub fn macro_registrar(register: |Name, SyntaxExtension|) { register(token::intern("fourcc"), NormalTT(~BasicMacroExpander { @@ -155,6 +154,6 @@ fn target_endian_little(cx: &ExtCtxt, sp: Span) -> bool { contains(cx.cfg(), meta) } -// Fixes LLVM assert on Windows +// FIXME (10872): This is required to prevent an LLVM assert on Windows #[test] fn dummy_test() { } |
