test(golden): language-neutral fixtures + per-binding parity runners (#255)
**Task 5 — golden-fixture parity for the C-ABI bindings.** Lifts the C#/Go/Java/R tests from *one indicator per archetype* toward reference-value parity, catching FFI wiring bugs (swapped params, wrong multi-output field) the math-only core tests cannot see. ## What's here - **`examples/rust/src/bin/gen_golden.rs`** + **`testdata/golden/*.csv`** — a Rust generator computing a deterministic OHLCV series plus the core's reference outputs for a curated archetype-spanning set: scalar (`Sma`/`Ema`/`Rsi`), candle (`Atr`), scalar multi-output (`MACD`), candle multi-output (`ADX`), pairwise (`Beta`). `nan` marks warmup. Regenerate with `cargo run -p wickra-examples --bin gen_golden`. - **Parity runners** replaying the identical fixtures through each FFI (rel-tol 1e-6), each a standard test in the binding's existing suite (no `ci.yml` change — rides `dotnet test` / `go test` / `mvn install` / `R CMD`+testthat). A walk-up search locates `testdata/golden` regardless of run dir. - **C#** (`bindings/csharp/.../GoldenTests.cs`) — ✅ validated locally, 7/7 pass. - **Go** (`bindings/go/golden_test.go`) — ✅ validated locally, pass. - **Java** (`bindings/java/.../GoldenTests.java`) — modeled on the archetype API; validated by CI (no local mvn). - **R** (`bindings/r/tests/testthat/test-golden.R`) — modeled on the archetype API; validated by CI (no local Rscript). ## Notes - The curated set spans every marshalling archetype; extending the indicator list is mechanical (add to the generator + regenerate). Bars/profile archetypes can be added next. - No new CI jobs.
This commit is contained in:
Vendored
+81
@@ -0,0 +1,81 @@
|
||||
sma
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
nan
|
||||
107.082865308575
|
||||
106.96031118542241
|
||||
106.55098952518925
|
||||
105.93612732359576
|
||||
105.21531190077062
|
||||
104.49759506253974
|
||||
103.89175182739567
|
||||
103.49656387805487
|
||||
103.39199568793734
|
||||
103.63205153291037
|
||||
104.23995145016349
|
||||
105.20605706144154
|
||||
106.48873254066868
|
||||
108.01806381828972
|
||||
109.7021037968819
|
||||
111.4350857115261
|
||||
113.10687095991703
|
||||
114.61278745568676
|
||||
115.86297967414018
|
||||
116.79043517866376
|
||||
117.35697064210828
|
||||
117.55664264968355
|
||||
117.41627860650068
|
||||
116.99308032537222
|
||||
116.36951435923494
|
||||
115.64594550958222
|
||||
114.93167153765809
|
||||
114.33515992096163
|
||||
113.9543587765253
|
||||
113.86794744733447
|
||||
114.12830831094557
|
||||
114.75684761770661
|
||||
115.742083334167
|
||||
117.04067079892921
|
||||
118.58127457216008
|
||||
120.2709406179764
|
||||
122.00339961162967
|
||||
123.66855966178939
|
||||
125.16234049131411
|
||||
126.39597061843133
|
||||
127.30391704882051
|
||||
127.84973914282192
|
||||
128.0293437492481
|
||||
127.87135083438908
|
||||
127.43453694566097
|
||||
126.80258487767678
|
||||
126.07660853743191
|
||||
125.36612074013492
|
||||
124.7792507555816
|
||||
124.41308544252024
|
||||
124.34499676870873
|
||||
124.62573040346784
|
||||
125.27487275817427
|
||||
126.27910139046546
|
||||
127.59337505833837
|
||||
129.14495712015346
|
||||
130.83991288220435
|
||||
132.57150050514548
|
||||
134.2297059345968
|
||||
135.71107012897224
|
||||
136.92793074753726
|
||||
137.81625276622648
|
||||
138.34134853563094
|
||||
138.50097632541122
|
||||
138.3255405713923
|
||||
137.87537593786334
|
||||
137.23535780170852
|
||||
|
Reference in New Issue
Block a user