1 #!/usr/bin/env python 2 3 # Copyright (c) 2011 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 Verifies build of an executable with C++ defines. 9 """ 10 11 import TestGyp 12 13 test = TestGyp.TestGyp() 14 15 test.run_gyp('defines.gyp') 16 17 test.build('defines.gyp') 18 19 expect = """\ 20 FOO is defined 21 VALUE is 1 22 2*PAREN_VALUE is 12 23 HASH_VALUE is a#1 24 """ 25 test.run_built_executable('defines', stdout=expect) 26 27 test.pass_test() 28