Skip to content

fix 16 decimal number encoding assertion#5

Merged
agentzh merged 1 commit intoopenresty:masterfrom
thibaultcha:fix/16-digit-precision
Feb 26, 2016
Merged

fix 16 decimal number encoding assertion#5
agentzh merged 1 commit intoopenresty:masterfrom
thibaultcha:fix/16-digit-precision

Conversation

@thibaultcha
Copy link
Member

rather minor, but not sure how this made its way in without being noticed, maybe assertions were disabled when developing #4 and the test case was never run separately? Noticed this while running the test suite, it might help to not confuse future contributors.

before:

tests/agentzh.t .. 1/10 Failed to execute --- lua for test TEST 5: default and max precision: Assertion failed: (1 <= precision && precision <= 14), function set_number_format, file fpconv.c, line 157.

# Looks like you planned 10 tests but ran 8.
# Looks like your test exited with 25 just after 8.
tests/agentzh.t .. Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 2/10 subtests

Test Summary Report
-------------------
tests/agentzh.t (Wstat: 6400 Tests: 8 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 10 tests but ran 8.
Files=1, Tests=8,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.06 cusr  0.02 csys =  0.11 CPU)
Result: FAIL

now:

tests/agentzh.t .. ok
All tests successful.
Files=1, Tests=10,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.06 cusr  0.02 csys =  0.11 CPU)
Result: PASS

agentzh added a commit that referenced this pull request Feb 26, 2016
fix 16 decimal number encoding assertion
@agentzh agentzh merged commit 77b8669 into openresty:master Feb 26, 2016
@agentzh
Copy link
Member

agentzh commented Feb 26, 2016

Thanks!

hishamhm pushed a commit to hishamhm/lua-cjson that referenced this pull request Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants