summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-19 20:56:21 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-19 20:56:21 +0200
commit1039bb09ecd50e6032173dcfb792c56cbd2b618a (patch)
treedff6a51fc7fc81fbea984a85ce1f3b563e02a42b
parentd7f4cd696c9245870eabd5f57d3000a70aaad64b (diff)
downloadfengari-1039bb09ecd50e6032173dcfb792c56cbd2b618a.tar.gz
fengari-1039bb09ecd50e6032173dcfb792c56cbd2b618a.tar.bz2
fengari-1039bb09ecd50e6032173dcfb792c56cbd2b618a.zip
[test-suite] nextvar.js, fixed bad comparison in LTNum
-rw-r--r--README.md4
-rw-r--r--src/lvm.js2
-rw-r--r--tests/test-suite/nextvar.js (renamed from tests/test-suite/inprogress/nextvar.js)6
3 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 227580f..ea8ed37 100644
--- a/README.md
+++ b/README.md
@@ -54,18 +54,18 @@ IRC: #fengari on freenode
- [x] Auxiliary library
- [ ] Run [Lua test suite](https://github.com/lua/tests)
- [x] `calls.lua` (32/32)
+ - [x] `closure.lua` (16/16)
- [x] `constructs.lua` (`_soft`) (10/10)
- [x] `events.lua` (26/26)
- [x] `literals.lua` (30/30)
- [x] `locals.lua` (10/10)
+ - [x] `nextvar.lua` (44/44)
- [x] `strings.lua` (34/34)
- [x] `vararg.lua` (8/8)
- - [x] `closure.lua` (16/16)
- [ ] `bitwise.lua` (9/16)
- [ ] `coroutine.lua` (32/40)
- [ ] `goto.lua` (16/18)
- [ ] `math.lua` (44/68)
- - [ ] `nextvar.lua` (42/44)
- [ ] `pm.lua` (27/38)
- [ ] `sort.lua` (21/24)
- [ ] `tpack.lua` (20/32)
diff --git a/src/lvm.js b/src/lvm.js
index df4f62f..6857b1d 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -835,7 +835,7 @@ const LTnum = function(l, r) {
if (r.ttisinteger())
return l.value < r.value ? 1 : 0;
else
- return LTintfloat(r.value, l.value);
+ return LTintfloat(l.value, r.value);
} else {
if (r.ttisfloat())
return l.value < r.value ? 1 : 0;
diff --git a/tests/test-suite/inprogress/nextvar.js b/tests/test-suite/nextvar.js
index bf9e601..6cf7c74 100644
--- a/tests/test-suite/inprogress/nextvar.js
+++ b/tests/test-suite/nextvar.js
@@ -4,9 +4,9 @@ const test = require('tape');
global.WEB = false;
-const lua = require('../../../src/lua.js');
-const lauxlib = require('../../../src/lauxlib.js');
-const lualib = require('../../../src/lualib.js');
+const lua = require('../../src/lua.js');
+const lauxlib = require('../../src/lauxlib.js');
+const lualib = require('../../src/lualib.js');
const prefix = `