lib: uncollide strconv test helper for package composition
This commit is contained in:
@@ -27,7 +27,7 @@ import os;
|
||||
import math;
|
||||
|
||||
|
||||
fn streq(a: str, b: str) bool = {
|
||||
fn fstreq(a: str, b: str) bool = {
|
||||
if (a.len != b.len) { return false; };
|
||||
let k: i32 = 0i32;
|
||||
for (k < a.len) {
|
||||
@@ -38,7 +38,7 @@ fn streq(a: str, b: str) bool = {
|
||||
};
|
||||
|
||||
fn chk(n: f64, want: str) bool = {
|
||||
return streq(f64tos(n), want);
|
||||
return fstreq(f64tos(n), want);
|
||||
};
|
||||
|
||||
// rt64 — bit-exact round-trip: render then parse back must reproduce the
|
||||
@@ -97,7 +97,7 @@ fn rt64(x: f64) bool = {
|
||||
};
|
||||
|
||||
fn chkf32(n: f32, want: str) bool = {
|
||||
return streq(f32tos(n), want);
|
||||
return fstreq(f32tos(n), want);
|
||||
};
|
||||
|
||||
// ftos_test.ha tcs G/void rows (the "pass for both f32 and f64" set) —
|
||||
|
||||
Reference in New Issue
Block a user