Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1929)

Unified Diff: test/win/gyptest-cl-floating-point-model.py

Issue 720153005: ninja win: Add msvs emulation for FloatingPointModel (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/win/compiler-flags/floating-point-model.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « test/win/compiler-flags/floating-point-model.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698