Make test/cxxflags use a user define instead of __OPTIMIZE__

__OPTIMIZE__ is a gcc-specific define, so this was broken on Windows
after https://code.google.com/p/gyp/source/detail?r=1893.

R=thakis@chromium.org

Review URL: https://codereview.chromium.org/235033003

git-svn-id: http://gyp.googlecode.com/svn/trunk@1895 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/test/cxxflags/cxxflags.cc b/test/cxxflags/cxxflags.cc
index c1e2452..44b299c 100644
--- a/test/cxxflags/cxxflags.cc
+++ b/test/cxxflags/cxxflags.cc
@@ -6,10 +6,10 @@
 
 int main(int argc, char *argv[])
 {
-#ifdef __OPTIMIZE__
-  printf("Using an optimization flag\n");
+#ifdef ABC
+  printf("With define\n");
 #else
-  printf("Using no optimization flag\n");
+  printf("No define\n");
 #endif
   return 0;
 }
diff --git a/test/cxxflags/cxxflags.gyp b/test/cxxflags/cxxflags.gyp
index 24d883a..a082d49 100644
--- a/test/cxxflags/cxxflags.gyp
+++ b/test/cxxflags/cxxflags.gyp
@@ -7,7 +7,6 @@
     {
       'target_name': 'cxxflags',
       'type': 'executable',
-      'opt': '-Os',
       'sources': [
         'cxxflags.cc',
       ],
diff --git a/test/cxxflags/gyptest-cxxflags.py b/test/cxxflags/gyptest-cxxflags.py
index b8bed7f..117a180 100755
--- a/test/cxxflags/gyptest-cxxflags.py
+++ b/test/cxxflags/gyptest-cxxflags.py
@@ -20,25 +20,25 @@
 
 # We reset the environ after calling gyp. When the auto-regeneration happens,
 # the same define should be reused anyway.
-with TestGyp.LocalEnv({'CXXFLAGS': '-O0'}):
+with TestGyp.LocalEnv({'CXXFLAGS': ''}):
   test.run_gyp('cxxflags.gyp')
 
 test.build('cxxflags.gyp')
 
 expect = """\
-Using no optimization flag
+No define
 """
 test.run_built_executable('cxxflags', stdout=expect)
 
 test.sleep()
 
-with TestGyp.LocalEnv({'CXXFLAGS': '-O2'}):
+with TestGyp.LocalEnv({'CXXFLAGS': '-DABC'}):
   test.run_gyp('cxxflags.gyp')
 
 test.build('cxxflags.gyp')
 
 expect = """\
-Using an optimization flag
+With define
 """
 test.run_built_executable('cxxflags', stdout=expect)