diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-06 01:30:11 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-06 01:30:11 -0700 |
| commit | 66eee5a06b60b328daaf11458d1f520c5824d62e (patch) | |
| tree | a8181c87f5b1f301af920b870bb35d185cdac379 /test/run_tests.cpp | |
| parent | 3c43bc9208701af151a0346744e3bfc7eae43042 (diff) | |
| download | zig-66eee5a06b60b328daaf11458d1f520c5824d62e.tar.gz zig-66eee5a06b60b328daaf11458d1f520c5824d62e.zip | |
add unknown size array test
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index e3c646f5ee..b44dc6ac7a 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -369,8 +369,15 @@ pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 { print_str("OK\n"); } + if (get_array_len(array) != 5) { + print_str("BAD\n"); + } + return 0; } +fn get_array_len(a: []u32) -> usize { + a.len +} )SOURCE", "OK\n"); |
