aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js')
-rw-r--r--Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js b/Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js
new file mode 100644
index 000000000..0d2585fa9
--- /dev/null
+++ b/Examples/test-suite/javascript/cpp17_hex_floating_literals_runme.js
@@ -0,0 +1,37 @@
+var cpp17_hex_floating_literals = require("cpp17_hex_floating_literals");
+
+if (cpp17_hex_floating_literals.f1 != 0.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f2 != 0.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f3 != 0.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f4 != 7.5) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f5 != 20.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f6 != 64.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f7 != 11452.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f8 != 149140.) {
+ throw new Error;
+}
+
+if (cpp17_hex_floating_literals.f9 != 18253638.) {
+ throw new Error;
+}