Index: test/win/gyptest-cl-floating-point-model.py |
diff --git a/test/win/gyptest-cl-floating-point-model.py b/test/win/gyptest-cl-floating-point-model.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..81c0bdcf27e3a91802947cc19d6097ccaefc389a |
--- /dev/null |
+++ b/test/win/gyptest-cl-floating-point-model.py |
@@ -0,0 +1,46 @@ |
+#!/usr/bin/env python |
+ |
+# Copyright (c) 2014 Google Inc. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+""" |
+Make sure floating point model settings are extracted properly. |
+""" |
+ |
+import TestGyp |
+ |
+import sys |
+ |
+if sys.platform == 'win32': |
+ test = TestGyp.TestGyp(formats=['ninja']) |
+ |
+ CHDIR = 'compiler-flags' |
+ test.run_gyp('floating-point-model.gyp', chdir=CHDIR) |
+ |
+ # 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
|
+ # verify the correct ninja command line contents. |
+ |
+ ninja_file = test.built_file_path( |
+ 'obj/test-floating-point-model-default.ninja', |
+ chdir=CHDIR) |
+ test.must_not_contain(ninja_file, '/fp:precise') |
+ test.must_not_contain(ninja_file, '/fp:strict') |
+ test.must_not_contain(ninja_file, '/fp:fast') |
+ |
+ ninja_file = test.built_file_path( |
+ 'obj/test-floating-point-model-precise.ninja', |
+ chdir=CHDIR) |
+ test.must_contain(ninja_file, '/fp:precise') |
+ |
+ ninja_file = test.built_file_path( |
+ 'obj/test-floating-point-model-strict.ninja', |
+ chdir=CHDIR) |
+ test.must_contain(ninja_file, '/fp:strict') |
+ |
+ ninja_file = test.built_file_path( |
+ 'obj/test-floating-point-model-fast.ninja', |
+ chdir=CHDIR) |
+ test.must_contain(ninja_file, '/fp:fast') |
+ |
+ test.pass_test() |