Skip to content

Commit 9c33b01

Browse files
authored
Add test cases for "g/G" with special float values
1 parent 5080788 commit 9c33b01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/fmtspec.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,18 +407,24 @@ end
407407

408408
@test pyfmt("f", NaN) == "NaN"
409409
@test pyfmt("e", NaN) == "NaN"
410+
@test pyfmt("g", NaN) == "NaN"
410411
@test pyfmt("f", NaN32) == "NaN"
411412
@test pyfmt("e", NaN32) == "NaN"
413+
@test pyfmt("g", NaN32) == "NaN"
412414

413415
@test pyfmt("f", Inf) == "Inf"
414416
@test pyfmt("e", Inf) == "Inf"
417+
@test pyfmt("g", Inf) == "Inf"
415418
@test pyfmt("f", Inf32) == "Inf"
416419
@test pyfmt("e", Inf32) == "Inf"
420+
@test pyfmt("g", Inf32) == "Inf"
417421

418422
@test pyfmt("f", -Inf) == "-Inf"
419423
@test pyfmt("e", -Inf) == "-Inf"
424+
@test pyfmt("g", -Inf) == "-Inf"
420425
@test pyfmt("f", -Inf32) == "-Inf"
421426
@test pyfmt("e", -Inf32) == "-Inf"
427+
@test pyfmt("g", -Inf32) == "-Inf"
422428

423429
@test pyfmt("<5f", Inf) == "Inf "
424430
@test pyfmt("^5f", Inf) == " Inf "

0 commit comments

Comments
 (0)