diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/strings.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testes/strings.lua b/testes/strings.lua index 2540fdef..0e7874bf 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -255,6 +255,12 @@ do -- longest number that can be formatted | |||
255 | local s = string.format('%.99f', -(10^i)) | 255 | local s = string.format('%.99f', -(10^i)) |
256 | assert(string.len(s) >= i + 101) | 256 | assert(string.len(s) >= i + 101) |
257 | assert(tonumber(s) == -(10^i)) | 257 | assert(tonumber(s) == -(10^i)) |
258 | |||
259 | -- limit for floats | ||
260 | assert(10^38 < math.huge) | ||
261 | local s = string.format('%.99f', -(10^38)) | ||
262 | assert(string.len(s) >= 38 + 101) | ||
263 | assert(tonumber(s) == -(10^38)) | ||
258 | end | 264 | end |
259 | 265 | ||
260 | 266 | ||