summaryrefslogtreecommitdiff
path: root/tests/test-suite
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann@users.noreply.github.com>2017-05-22 20:06:57 +0200
committerGitHub <noreply@github.com>2017-05-22 20:06:57 +0200
commite3bdd1fea3665df28de25ed76f6399faf957179d (patch)
tree6884757b43064fa7163b54b86aa4561d185b5ca2 /tests/test-suite
parent25e2110a5eac0a2e6c7b4d502ffbd53fc61af301 (diff)
parent8a439e5563f12335e3d35dd63b4f8cbcc25a9bd8 (diff)
downloadfengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.gz
fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.bz2
fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.zip
Merge pull request #63 from daurnimator/fix-skipped-tests
Investigated + fixed some skipped tests
Diffstat (limited to 'tests/test-suite')
-rw-r--r--tests/test-suite/errors.js7
-rw-r--r--tests/test-suite/events.js13
-rw-r--r--tests/test-suite/math.js2
-rw-r--r--tests/test-suite/nextvar.js3
-rw-r--r--tests/test-suite/strings.js5
5 files changed, 14 insertions, 16 deletions
diff --git a/tests/test-suite/errors.js b/tests/test-suite/errors.js
index c18adeb..5980724 100644
--- a/tests/test-suite/errors.js
+++ b/tests/test-suite/errors.js
@@ -836,7 +836,7 @@ test("[test-suite] errors: testing line error", function (t) {
});
-test("[test-suite] errors: several tests that exhaust the Lua stack", { skip: true }, function (t) {
+test("[test-suite] errors: several tests that exhaust the Lua stack", function (t) {
let luaCode = `
C = 0
local l = debug.getinfo(1, "l").currentline; function y () C=C+1; y() end
@@ -871,9 +871,10 @@ test("[test-suite] errors: several tests that exhaust the Lua stack", { skip: tr
});
-test("[test-suite] errors: error lines in stack overflow", { skip: true }, function (t) {
+test("[test-suite] errors: error lines in stack overflow", function (t) {
let luaCode = `
C = 0
+ local l = debug.getinfo(1, "l").currentline; function y () C=C+1; y() end
local l1
local function g(x)
l1 = debug.getinfo(x, "l").currentline; y()
@@ -950,7 +951,7 @@ test("[test-suite] errors: error in error handling", function (t) {
});
-test("[test-suite] errors: too many results", { skip: true }, function (t) {
+test("[test-suite] errors: too many results", function (t) {
let luaCode = `
local function loop (x,y,z) return 1 + loop(x, y, z) end
diff --git a/tests/test-suite/events.js b/tests/test-suite/events.js
index d5ed5ae..0f94f36 100644
--- a/tests/test-suite/events.js
+++ b/tests/test-suite/events.js
@@ -301,7 +301,6 @@ test("[test-suite] events: test comparison", function (t) {
});
-// TODO: uncomment asserts when next is fixed for cleared table entries
test("[test-suite] events: test 'partial order'", function (t) {
let luaCode = `
t = {}
@@ -327,9 +326,9 @@ test("[test-suite] events: test 'partial order'", function (t) {
t.__le = nil
assert(Set{1,2,3} < Set{1,2,3,4})
- -- assert(not(Set{1,2,3,4} < Set{1,2,3,4}))
- -- assert((Set{1,2,3,4} <= Set{1,2,3,4}))
- -- assert((Set{1,2,3,4} >= Set{1,2,3,4}))
+ assert(not(Set{1,2,3,4} < Set{1,2,3,4}))
+ assert((Set{1,2,3,4} <= Set{1,2,3,4}))
+ assert((Set{1,2,3,4} >= Set{1,2,3,4}))
assert((Set{1,3} <= Set{3,5})) -- wrong!! model needs a 'le' method ;-)
t.__le = function (a,b)
@@ -352,11 +351,11 @@ test("[test-suite] events: test 'partial order'", function (t) {
end
local s = Set{1,3,5}
- -- assert(s == Set{3,5,1})
+ assert(s == Set{3,5,1})
assert(not rawequal(s, Set{3,5,1}))
assert(rawequal(s, s))
- -- assert(Set{1,3,5,1} == rawSet{3,5,1})
- -- assert(rawSet{1,3,5,1} == Set{3,5,1})
+ assert(Set{1,3,5,1} == rawSet{3,5,1})
+ assert(rawSet{1,3,5,1} == Set{3,5,1})
assert(Set{1,3,5} ~= Set{3,5,1,6})
-- '__eq' is not used for table accesses
diff --git a/tests/test-suite/math.js b/tests/test-suite/math.js
index e79281b..b92d304 100644
--- a/tests/test-suite/math.js
+++ b/tests/test-suite/math.js
@@ -746,7 +746,7 @@ test("[test-suite] math: 'tonumber' with strings", function (t) {
});
-test("[test-suite] math: tests with very long numerals", { skip: true }, function (t) {
+test("[test-suite] math: tests with very long numerals", function (t) {
let luaCode = `
assert(tonumber("0x"..string.rep("f", 13)..".0") == 2.0^(4*13) - 1)
assert(tonumber("0x"..string.rep("f", 150)..".0") == 2.0^(4*150) - 1)
diff --git a/tests/test-suite/nextvar.js b/tests/test-suite/nextvar.js
index d119d97..28a54e7 100644
--- a/tests/test-suite/nextvar.js
+++ b/tests/test-suite/nextvar.js
@@ -907,8 +907,7 @@ test("[test-suite] nextvar: next", function (t) {
});
-// TODO: infinite loop ?
-test("[test-suite] nextvar: testing floats in numeric for", { skip: true }, function (t) {
+test("[test-suite] nextvar: testing floats in numeric for", function (t) {
let luaCode = `
do
local a
diff --git a/tests/test-suite/strings.js b/tests/test-suite/strings.js
index 3584a80..c501ddd 100644
--- a/tests/test-suite/strings.js
+++ b/tests/test-suite/strings.js
@@ -288,7 +288,7 @@ test('[test-suite] strings: tostring', function (t) {
end
if tostring(0.0) == "0.0" then -- "standard" coercion float->string
- -- assert('' .. 12 == '12' and 12.0 .. '' == '12.0') -- TODO: How to do this in JS ?
+ assert('' .. 12 == '12' and 12.0 .. '' == '12.0')
assert(tostring(-1203 + 0.0) == "-1203.0")
else -- compatible coercion
assert(tostring(0.0) == "0")
@@ -365,8 +365,7 @@ test('[test-suite] strings: string.format', function (t) {
});
-// TODO: http://lua-users.org/lists/lua-l/2016-05/msg00455.html
-test('[test-suite] strings: %q', { skip: true }, function (t) {
+test('[test-suite] strings: %q', function (t) {
let luaCode = `
do
local function checkQ (v)