lib: move strconv tests into the package dir (Go layout)
lib/strconv/test/ was the last _test layout deviating from Go's in-package shape (src/bytes/bytes_test.go declares bytes_test in the package dir). Its rationale — `import strconv` file-hitting the sibling strconv.ww — dissolved when #98 made directory packages win over same-named files on any search entry. libbyteid re-paths the three fx entries and drops the covered() carve-out: the completeness scan now keys lib/strconv through the fixtures' dirname. Walk line flips to "ok lib/strconv [strconv_test, external]".
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
// ftostest — exercises lib/strconv/ftos.ww (Hare ftos.ha / ftos_ryu.ha
|
||||
// Ryū port). Run with `out/bin/ww run lib/strconv/test/ftos_test.ww`.
|
||||
// A failing row aborts via the assert/abort builtin (task #5 @test
|
||||
// conversion).
|
||||
// Ryū port).
|
||||
//
|
||||
// Ports ref/hare/strconv/+test/ftos_test.ha's ffmt::G / prec=void /
|
||||
// fflags::NONE rows (the f64tos cases) verbatim — these are exactly
|
||||
@@ -15,10 +13,6 @@
|
||||
// "pass for both f32 and f64" set, lines 9/183); the _extremes rows mirror
|
||||
// tcsf32 (ftos_test.ha:218-221, the f32-EXCLUSIVE denormal/min/max — full
|
||||
// f32 mantissa). f32 values use the `f32` literal suffix or f32frombits.
|
||||
//
|
||||
// Lives in lib/strconv/test/ so `import strconv` resolves to the
|
||||
// DIRECTORY (full package), not the strconv.ww FILE — same rationale as
|
||||
// stoftest/decimaltest.
|
||||
|
||||
package strconv_test;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// inttest — exercises lib/strconv integer parse: parseint / stoi64 /
|
||||
// stou64 / the iN/uN width wrappers. Run with
|
||||
// `out/bin/ww run lib/strconv/test/inttest.ww`. A failing row aborts via
|
||||
// the assert/abort builtin (task #5 @test conversion).
|
||||
// stou64 / the iN/uN width wrappers.
|
||||
//
|
||||
// Verbatim port of ref/hare/strconv/stoi.ha:56-86 (stoi/stoi_bases) and
|
||||
// stou.ha:116-138 (stou/stou_bases). Hare's strconv integer tests are
|
||||
@@ -10,10 +8,6 @@
|
||||
// verbatim ports). The leading id arg to each check helper is retained
|
||||
// to keep the rows 1:1 but is now inert (signalled plumbing removed, task #5).
|
||||
//
|
||||
// Lives in lib/strconv/test/ (not lib/strconv/) so `import strconv`
|
||||
// resolves to the lib/strconv DIRECTORY (pulls the full package), not
|
||||
// the strconv.ww FILE — same rationale as 922_decimal_run.
|
||||
//
|
||||
// Hex/oct/bin expected values are written in decimal (ww has no 0x/0o/0b
|
||||
// literal form for the expectation side); the original Hare radix form
|
||||
// is noted inline.
|
||||
@@ -1,6 +1,4 @@
|
||||
// stoftest — exercises lib/strconv/stof.ww (Hare stof.ha port).
|
||||
// Run with `out/bin/ww run lib/strconv/test/stoftest.ww`. A failing row
|
||||
// aborts via the assert/abort builtin (task #5 @test conversion).
|
||||
//
|
||||
// Ports ref/hare/strconv/stof.ha's @test vectors (stof64 / stof32 /
|
||||
// stofhex). Comparisons are BIT-level (math.f64bits / f32bits) so a
|
||||
@@ -9,10 +7,6 @@
|
||||
// f64frombits(INF_BITS) (ww math has no NAN/INF f32/f64 const — see
|
||||
// math/floats.ww). Hex extremes (Hare's math::F64_MAX_NORMAL etc.,
|
||||
// absent in ww math) assert against the IEEE-754 bit patterns directly.
|
||||
//
|
||||
// Lives in lib/strconv/test/ so `import strconv` resolves to the
|
||||
// DIRECTORY (full package: strconv.ww + decimal.ww + stof_data.ww +
|
||||
// stof.ww), not the strconv.ww FILE — same rationale as decimaltest.
|
||||
|
||||
package strconv_test;
|
||||
|
||||
@@ -124,9 +124,9 @@ fn corpus() []ent = {
|
||||
append(es, pr("package main;\nimport os.exec;\nfn main() i32 = { return 0; };\n",
|
||||
"package exec;", "lib/os/exec"));
|
||||
append(es, fx("lib/regex/regex_test.ww"));
|
||||
append(es, fx("lib/strconv/test/ftos_test.ww"));
|
||||
append(es, fx("lib/strconv/test/stof_test.ww"));
|
||||
append(es, fx("lib/strconv/test/int_test.ww"));
|
||||
append(es, fx("lib/strconv/ftos_test.ww"));
|
||||
append(es, fx("lib/strconv/stof_test.ww"));
|
||||
append(es, fx("lib/strconv/int_test.ww"));
|
||||
// strings' families share helpers_test.ww (B3 split) — the
|
||||
// single-file roots dissolved; the composed package is the root.
|
||||
append(es, dx("lib/strings"));
|
||||
@@ -188,8 +188,6 @@ fn covered() []str = {
|
||||
append(cs, "lib/math");
|
||||
append(cs, "lib/rt");
|
||||
append(cs, "lib/types");
|
||||
// module body dragged into the lib/strconv/test fixtures
|
||||
append(cs, "lib/strconv");
|
||||
// #17: the @test runner is AUTO-BUNDLED into every -T sep build,
|
||||
// so every @test fixture byte-ids it cs/ww; 911_attest_record
|
||||
// also compares it directly. It has no _test.ww of its own.
|
||||
|
||||
Reference in New Issue
Block a user