diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 12:26:56 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-04 12:26:56 -0300 |
| commit | 3b001d9a9ddcd9a7ea75c1d021850f63b3a61ce0 (patch) | |
| tree | 6b700ba6866362584558c8709eada48490179460 | |
| parent | c36b5cc726dc5443d78b59c4ef1be2a41e08de59 (diff) | |
| download | lua-3b001d9a9ddcd9a7ea75c1d021850f63b3a61ce0.tar.gz lua-3b001d9a9ddcd9a7ea75c1d021850f63b3a61ce0.tar.bz2 lua-3b001d9a9ddcd9a7ea75c1d021850f63b3a61ce0.zip | |
more tests for boolean API
| -rw-r--r-- | ltests.c | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ | 2 | ** $Id: ltests.c,v 1.109 2002/02/14 21:42:22 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -561,9 +561,15 @@ static int testC (lua_State *L) { | |||
| 561 | else if EQ("pushnum") { | 561 | else if EQ("pushnum") { |
| 562 | lua_pushnumber(L, getnum); | 562 | lua_pushnumber(L, getnum); |
| 563 | } | 563 | } |
| 564 | else if EQ("pushnil") { | ||
| 565 | lua_pushnil(L); | ||
| 566 | } | ||
| 564 | else if EQ("pushbool") { | 567 | else if EQ("pushbool") { |
| 565 | lua_pushboolean(L, getnum); | 568 | lua_pushboolean(L, getnum); |
| 566 | } | 569 | } |
| 570 | else if EQ("tobool") { | ||
| 571 | lua_pushnumber(L, lua_toboolean(L, getnum)); | ||
| 572 | } | ||
| 567 | else if EQ("pushvalue") { | 573 | else if EQ("pushvalue") { |
| 568 | lua_pushvalue(L, getnum); | 574 | lua_pushvalue(L, getnum); |
| 569 | } | 575 | } |
