Fix tests from jerry-test-suite.

This commit is contained in:
Ilmir Usmanov
2014-10-16 18:03:35 +04:00
parent 2637911b3e
commit 2a5cbe5975
30 changed files with 35 additions and 31 deletions
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
assert(((new Number(1) - 1 !== 0) || (1 - new Number(1) !== 0))) assert(!(((new Number(1) - 1 !== 0) || (1 - new Number(1) !== 0))))
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
assert(Number.MIN_VALUE + -Number.MIN_VALUE !== +0) assert(!(Number.MIN_VALUE + -Number.MIN_VALUE !== +0))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = NaN, y = 1 var x = NaN, y = 1
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 2, y = NaN var x = 2, y = NaN
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 2.8, y = 3.4 var x = 2.8, y = 3.4
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = "abg", y = 'abh' var x = "abg", y = 'abh'
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = "abg", y = 'aBg' var x = "abg", y = 'aBg'
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = false, y = true var x = false, y = true
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 0.123, y = "0.124" var x = 0.123, y = "0.124"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 0.123, y = "0.123e+2" var x = 0.123, y = "0.123e+2"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 0.123, y = "0.123a" var x = 0.123, y = "0.123a"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 0.123, y = "b0.123" var x = 0.123, y = "b0.123"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = true, y = "-1" var x = true, y = "-1"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = true, y = "true" var x = true, y = "true"
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = true, y = "123" var x = true, y = "123"
assert(x == y) assert(!(x == y))
@@ -15,4 +15,4 @@
var x = Object("abc") var x = Object("abc")
var y = Object("abc") var y = Object("abc")
b = x, c = y b = x, c = y
assert(c == b) assert(!(c == b))
@@ -14,4 +14,4 @@
var x = "a" var x = "a"
var y = 2 var y = 2
assert(x == y) assert(!(x == y))
@@ -13,4 +13,4 @@
// limitations under the License. // limitations under the License.
var x = 0.123, y = "0.123e+2" var x = 0.123, y = "0.123e+2"
assert(x == y) assert(!(x == y))
@@ -14,4 +14,4 @@
var x = "12.1e5" var x = "12.1e5"
var y = 1210000 var y = 1210000
assert(x != y) assert(!(x != y))
@@ -12,5 +12,5 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
var x = 123.00, y = 0.0123e+4 var x = 123.00, y = 0.0123e+4, eps = .000001
assert(x === y) assert(x <= y + eps && x >= y - eps)
@@ -12,5 +12,5 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
var x = 123.00, y = 0.0123e+4 var x = 123.00, y = 0.0123e+4, eps = .000001
assert(x === y) assert(x <= y + eps && x >= y - eps)
+1 -1
View File
@@ -14,4 +14,4 @@
var a = true; var a = true;
var b = false; var b = false;
assert((a && b) === true) assert(!((a && b) === true))
+1 -1
View File
@@ -14,4 +14,4 @@
var a = false; var a = false;
var b = false; var b = false;
assert((a && b) === true) assert(!((a && b) === true))
+1 -1
View File
@@ -14,4 +14,4 @@
var a = "not empty string"; // will be converted to true var a = "not empty string"; // will be converted to true
var b = new Object(); var b = new Object();
assert((a && b) !== b) assert(!((a && b) !== b))
+1 -1
View File
@@ -14,4 +14,4 @@
var a = ""; // empty string - false var a = ""; // empty string - false
var b = new Object(); var b = new Object();
assert((a && b) !== a) assert(!((a && b) !== a))
+1 -1
View File
@@ -15,4 +15,4 @@
var a = Number; var a = Number;
Number = null; Number = null;
var b = new a(5) var b = new a(5)
assert(b === 5); assert(!(b === 5));
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
assert(delete Number.NaN); assert(!(delete Number.NaN));
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
assert(isFinite(Number.NEGATIVE_INFINITY) && Number.NEGATIVE_INFINITY < 0); assert(!(isFinite(Number.NEGATIVE_INFINITY) && Number.NEGATIVE_INFINITY < 0));
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
assert(delete Number.NEGATIVE_INFINITY); assert(!(delete Number.NEGATIVE_INFINITY));
+4
View File
@@ -76,6 +76,10 @@
./tests/jerry-test-suite/15/15.05/15.05.01/15.05.01.01/15.05.01.01-014.js ./tests/jerry-test-suite/15/15.05/15.05.01/15.05.01.01/15.05.01.01-014.js
./tests/jerry-test-suite/15/15.05/15.05.01/15.05.01.01/15.05.01.01-015.js ./tests/jerry-test-suite/15/15.05/15.05.01/15.05.01.01/15.05.01.01-015.js
./tests/jerry-test-suite/15/15.07/15.07.02/15.07.02-003.js ./tests/jerry-test-suite/15/15.07/15.07.02/15.07.02-003.js
./tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.02/15.07.03.02-002.js
./tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.02/15.07.03.02-003.js
./tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.03/15.07.03.03-002.js
./tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.03/15.07.03.03-003.js
> for-in loop > for-in loop
./tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-001.js ./tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-001.js