Sprints 46-58 implement the cross-language porting foundation: language-to-IR adapters, equivalence checking, gate validation, legacy ingestion, managed/dynamic families, low-level/logic-actor semantics, debug workflow tooling, AST-native family tools, Rust/CPP raising tools, system-level orchestration, query family, and porting gates. Sprint 59 adds the governance layer (policy packs, review boards, waiver packets, ambiguity triage, decision ledger) with the whetstone_review_porting_decision MCP tool. Also includes: sprint plans 46-130, MCP taskitem pipeline scripts, CLAUDE.md, docs, and full test matrix (steps 689-828). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
1.7 KiB
C++
22 lines
1.7 KiB
C++
// Step 727: Equivalence evidence bundle exporter (8 tests)
|
|
#include "equiv/EquivalenceEvidenceBundle.h"
|
|
#include <iostream>
|
|
static int p=0,f=0;
|
|
#define T(n) { std::cout<<" "<<#n<<"... "; }
|
|
#define P() { std::cout<<"PASS\n"; ++p; }
|
|
#define F(m) { std::cout<<"FAIL: "<<m<<"\n"; ++f; }
|
|
#define C(c,m) if(!(c)){F(m);return;}
|
|
|
|
static EquivalenceEvidenceBundle mk(){auto d=DifferentialExecutionHarness::run({{"v1","a","a",false}});auto p=PropertyEquivalenceRunner::run(4,42);auto f=FuzzDifferentialRunner::run({2,1});return EquivalenceEvidenceBundleModel::build(d,p,f);}
|
|
|
|
void t1(){T(bundle_constructable);auto b=mk();C(b.differential.totalCount==1,"d");P();}
|
|
void t2(){T(differential_included);auto b=mk();C(b.differential.equivalentCount==1,"d");P();}
|
|
void t3(){T(property_included);auto b=mk();C(b.property.success,"p");P();}
|
|
void t4(){T(fuzz_included);auto b=mk();C(b.fuzz.size()==2,"f");P();}
|
|
void t5(){T(json_shape);auto j=EquivalenceEvidenceBundleModel::toJson(mk());C(j.contains("differential")&&j.contains("property")&&j.contains("fuzz"),"shape");P();}
|
|
void t6(){T(machine_readable);auto j=EquivalenceEvidenceBundleModel::toJson(mk());C(j["differential"].is_object()&&j["property"].is_object()&&j["fuzz"].is_array(),"obj");P();}
|
|
void t7(){T(fuzz_sorted);auto j=EquivalenceEvidenceBundleModel::toJson(mk());C(j["fuzz"][0].value("seed",9)==1,"sort");P();}
|
|
void t8(){T(deterministic);auto a=EquivalenceEvidenceBundleModel::toJson(mk()).dump();auto b=EquivalenceEvidenceBundleModel::toJson(mk()).dump();C(a==b,"det");P();}
|
|
|
|
int main(){std::cout<<"Step 727: EquivalenceEvidenceBundle\n";t1();t2();t3();t4();t5();t6();t7();t8();std::cout<<"\nResults: "<<p<<"/"<<(p+f)<<" passed\n";return f?1:0;}
|