@@ -44,7 +44,7 @@ proc `$`(a: MyEnum): string =
44
44
if a == me2: " me2Modif"
45
45
else : system.`$` (a)
46
46
47
- template fn () =
47
+ template fn () =
48
48
block : # toJson, jsonTo
49
49
type Foo = distinct float
50
50
testRoundtrip ('x' , """ 120 """ )
@@ -161,15 +161,16 @@ template fn() =
161
161
doAssert b[2 ].signbit
162
162
doAssert not b[3 ].signbit
163
163
164
- block : # bug #15397, bug #13196
165
- let a = 0.1
166
- let x = 0.12345678901234567890123456789
167
- let b = (a + 0.2 , 0.3 , x)
168
- testRoundtripVal (b): " [0.30000000000000004,0.3,0.12345678901234568]"
164
+ when defined (nimFpRoundtrips):
165
+ block : # bug #15397, bug #13196
166
+ let a = 0.1
167
+ let x = 0.12345678901234567890123456789
168
+ let b = (a + 0.2 , 0.3 , x)
169
+ testRoundtripVal (b): " [0.30000000000000004,0.3,0.12345678901234568]"
169
170
170
- testRoundtripVal (0.12345678901234567890123456789 ): " 0.12345678901234568"
171
- testRoundtripVal (epsilon (float64 )): " 2.220446049250313e-16"
172
- testRoundtripVal (1.0 + epsilon (float64 )): " 1.0000000000000002"
171
+ testRoundtripVal (0.12345678901234567890123456789 ): " 0.12345678901234568"
172
+ testRoundtripVal (epsilon (float64 )): " 2.220446049250313e-16"
173
+ testRoundtripVal (1.0 + epsilon (float64 )): " 1.0000000000000002"
173
174
174
175
block : # case object
175
176
type Foo = object
@@ -433,7 +434,7 @@ template fn() =
433
434
""" {"b": true, "bt": false, "btf": "test"} """
434
435
testRoundtrip (Variant (b: true , bt: true , btt: 'c' )):
435
436
""" {"b": true, "bt": true, "btt": "c"} """
436
-
437
+
437
438
# TODO : Add additional tests with missing and extra JSON keys, both when
438
439
# allowed and forbidden analogous to the tests for the not nested
439
440
# variant objects.
0 commit comments