diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-03 19:38:36 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-03 19:38:36 -0700 |
| commit | e64c0941f9cff66311c969b85be5fe5575c4ce45 (patch) | |
| tree | a3417dd85241d55362433f41e00b72d4d2cba435 /test/run_tests.cpp | |
| parent | fa6e3eec464227a2c20ca949e2fd12f3ab649960 (diff) | |
| download | zig-e64c0941f9cff66311c969b85be5fe5575c4ce45.tar.gz zig-e64c0941f9cff66311c969b85be5fe5575c4ce45.zip | |
implement #sizeof()
closes #8
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 7fb46bfcd7..43bcae7456 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -698,16 +698,17 @@ fn outer() -> isize { } )SOURCE", "OK\n"); - add_simple_case("#typeof()", R"SOURCE( + add_simple_case("#sizeof() and #typeof()", R"SOURCE( use "std.zig"; const x: u16 = 13; const z: #typeof(x) = 19; pub fn main(argc : isize, argv : &&u8, env : &&u8) -> i32 { const y: #typeof(x) = 120; - print_str("OK\n"); + print_u64(#sizeof(#typeof(y))); + print_str("\n"); return 0; } - )SOURCE", "OK\n"); + )SOURCE", "2\n"); } //////////////////////////////////////////////////////////////////////////////////// |
