diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-12-17 15:45:13 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-12-17 15:45:13 -0300 |
commit | c646e57fd6307bd891e4e50ef5d6ee56b34e4cac (patch) | |
tree | e8f2d8a7bcb9f5c51ddc03f94f576f2fc6f43f06 /testes/api.lua | |
parent | e0ab13c62f2c1af0af955f173beb3ea6473e8064 (diff) | |
download | lua-c646e57fd6307bd891e4e50ef5d6ee56b34e4cac.tar.gz lua-c646e57fd6307bd891e4e50ef5d6ee56b34e4cac.tar.bz2 lua-c646e57fd6307bd891e4e50ef5d6ee56b34e4cac.zip |
Joined common code in 'lua_rawset' and 'lua_rawsetp'
Diffstat (limited to 'testes/api.lua')
-rw-r--r-- | testes/api.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/api.lua b/testes/api.lua index b2680633..b5657416 100644 --- a/testes/api.lua +++ b/testes/api.lua | |||
@@ -516,9 +516,11 @@ print"+" | |||
516 | 516 | ||
517 | do -- getp/setp | 517 | do -- getp/setp |
518 | local a = {} | 518 | local a = {} |
519 | T.testC("rawsetp 2 1", a, 20) | 519 | local a1 = T.testC("rawsetp 2 1; return 1", a, 20) |
520 | assert(a == a1) | ||
520 | assert(a[T.pushuserdata(1)] == 20) | 521 | assert(a[T.pushuserdata(1)] == 20) |
521 | assert(T.testC("rawgetp -1 1; return 1", a) == 20) | 522 | local a1, res = T.testC("rawgetp -1 1; return 2", a) |
523 | assert(a == a1 and res == 20) | ||
522 | end | 524 | end |
523 | 525 | ||
524 | 526 | ||