OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
3 # Copyright (c) 2014 Google Inc. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 | |
7 """ | |
8 Make sure floating point model settings are extracted properly. | |
9 """ | |
10 | |
11 import TestGyp | |
12 | |
13 import sys | |
14 | |
15 if sys.platform == 'win32': | |
16 test = TestGyp.TestGyp(formats=['ninja']) | |
17 | |
18 CHDIR = 'compiler-flags' | |
19 test.run_gyp('floating-point-model.gyp', chdir=CHDIR) | |
20 | |
21 # It's hard to map flags to output contents in a non-fragile way, so just | |
scottmg
2014/11/13 21:35:55
I believe cl defines _M_FP_FAST, _M_FP_PRECISE, an
| |
22 # verify the correct ninja command line contents. | |
23 | |
24 ninja_file = test.built_file_path( | |
25 'obj/test-floating-point-model-default.ninja', | |
26 chdir=CHDIR) | |
27 test.must_not_contain(ninja_file, '/fp:precise') | |
28 test.must_not_contain(ninja_file, '/fp:strict') | |
29 test.must_not_contain(ninja_file, '/fp:fast') | |
30 | |
31 ninja_file = test.built_file_path( | |
32 'obj/test-floating-point-model-precise.ninja', | |
33 chdir=CHDIR) | |
34 test.must_contain(ninja_file, '/fp:precise') | |
35 | |
36 ninja_file = test.built_file_path( | |
37 'obj/test-floating-point-model-strict.ninja', | |
38 chdir=CHDIR) | |
39 test.must_contain(ninja_file, '/fp:strict') | |
40 | |
41 ninja_file = test.built_file_path( | |
42 'obj/test-floating-point-model-fast.ninja', | |
43 chdir=CHDIR) | |
44 test.must_contain(ninja_file, '/fp:fast') | |
45 | |
46 test.pass_test() | |
OLD | NEW |