diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-10-03 19:59:05 +0200 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-10-03 19:59:05 +0200 |
commit | a9f082c2d60417730d11d2c0dc9da7e6e5ed2e00 (patch) | |
tree | baf6d9b2d17814be17d45f90d09b74f47ebb9248 /tests | |
parent | 95420a111d0ba2154ce9953b2506f7e402b97d7b (diff) |
fix test_time
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 2 | ||||
-rw-r--r-- | tests/time/src.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py index c2f6b58e..95538ad3 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -1686,7 +1686,7 @@ if 'benchmark' not in str(sys.argv): if USE_TYPED_ARRAYS == 2: return self.skip('Typed arrays = 2 truncate i64s') src = open(path_from_root('tests', 'time', 'src.c'), 'r').read() expected = open(path_from_root('tests', 'time', 'output.txt'), 'r').read() - self.do_test(src, expected) + self.do_test(src, expected, extra_emscripten_args=['-H', 'libc/time.h']) def test_statics(self): # static initializers save i16 but load i8 for some reason diff --git a/tests/time/src.c b/tests/time/src.c index 9517b74c..aaf2878f 100644 --- a/tests/time/src.c +++ b/tests/time/src.c @@ -45,8 +45,8 @@ int main() { time_t t2 = xmas2002 - 60 * 60 * 24 * 30 * 6; tm_ptr = localtime(&t2); time_t dst_diff = (tm_ptr->tm_isdst == 1) ? tm_ptr->tm_isdst * 60 * 60 : 0; - printf("localtime timezone: %d\n", (timezone + tm_ptr->tm_gmtoff == dst_diff)); - printf("localtime daylight: %d\n", daylight == tm_ptr->tm_isdst); + printf("localtime timezone: %d\n", (_timezone + tm_ptr->tm_gmtoff == dst_diff)); // glibc needs + printf("localtime daylight: %d\n", _daylight == tm_ptr->tm_isdst); // no prefix "_"s printf("localtime tzname: %d\n", (!strcmp(tzname[0], tm_ptr->tm_zone) || !strcmp(tzname[1], tm_ptr->tm_zone))); |