summaryrefslogtreecommitdiff
path: root/deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc')
-rw-r--r--deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc b/deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc
new file mode 100644
index 0000000000..beeca2aa15
--- /dev/null
+++ b/deps/gyp/test/win/compiler-flags/default-char-is-unsigned.cc
@@ -0,0 +1,15 @@
+// Copyright (c) 2012 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.
+
+template <bool>
+struct CompileAssert {
+};
+
+#define COMPILE_ASSERT(expr, msg) \
+ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
+
+int main() {
+ COMPILE_ASSERT(char(-1) > 0, default_char_is_unsigned);
+ return 0;
+}