summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js b/external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js
new file mode 100644
index 000000000..233d88c5d
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/09_Type_Conversion/9.3_ToNumber/9.3.1_ToNumber_from_String/S9.3.1_A7.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S9.3.1_A7;
+ * @section: 9.3.1, 15.7.1;
+ * @assertion: The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits
+ * is the MV of the first DecimalDigits plus the MV of the second DecimalDigits times
+ * 10<sup><small>-n</small></sup>, where n is the number of characters in the second DecimalDigits;
+ * @description: Compare Number('1234.5678') with Number('1234')+(+('5678')*1e-4);
+*/
+
+// CHECK#1
+if (Number("1234.5678") !== Number("1234")+(+("5678")*1e-4)) {
+ $ERROR('#1: Number("1234.5678") === Number("1234")+(+("5678")*1e-4)');
+}