source/mir/parse.d
changed.
Showing 1 of 1 files from the diff.
@@ -308,12 +308,7 @@
Loading
308 | 308 | auto ret = decimal.fromStringImpl(str, key); |
|
309 | 309 | if (_expect(ret, true)) |
|
310 | 310 | { |
|
311 | - | switch(key) with(DecimalExponentKey) |
|
312 | - | { |
|
313 | - | case nan: value = decimal.coefficient.sign ? -T.nan : T.nan; break; |
|
314 | - | case infinity: value = decimal.coefficient.sign ? -T.infinity : T.infinity; break; |
|
315 | - | default: value = cast(T) decimal; break; |
|
316 | - | } |
|
311 | + | value = cast(T) decimal; |
|
317 | 312 | } |
|
318 | 313 | return ret; |
|
319 | 314 | } |
@@ -331,6 +326,15 @@
Loading
331 | 326 | assert("123".fromString(value) && value == 123); |
|
332 | 327 | } |
|
333 | 328 | ||
329 | + | /// |
|
330 | + | version(mir_test) |
|
331 | + | @safe pure nothrow @nogc unittest |
|
332 | + | { |
|
333 | + | double value = 0; |
|
334 | + | assert("+Inf".fromString(value) && value == double.infinity); |
|
335 | + | assert("-nan".fromString(value) && value != value); |
|
336 | + | } |
|
337 | + | ||
334 | 338 | /++ |
|
335 | 339 | Single character parsing utilities. |
|
336 | 340 |
Files | Coverage |
---|---|
source/mir | 91.65% |
Project Totals (78 files) | 91.65% |
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
3121625198
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.