Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_bench_json_test.cc File Reference

Validate that the perf-gate benchmark JSON is well formed. More...

#include <cstddef>
#include <map>
#include <sstream>
#include <string>
#include <variant>
#include <gtest/gtest.h>
#include <benchmarks/ca/bench_support.H>
Include dependency graph for ca_bench_json_test.cc:

Go to the source code of this file.

Functions

 TEST (CaBenchJson, EmitsWellFormedSchema)
 
 TEST (CaBenchJson, HandlesZeroAndLargeValues)
 
 TEST (CaBenchJson, CpuStringIsJsonSafe)
 

Detailed Description

Validate that the perf-gate benchmark JSON is well formed.

The performance gate parses each benchmark's single JSON line with an ordinary JSON reader, so this test exercises the emitter with a genuine recursive-descent parser: it must consume the entire line and expose the fixed {name, wall_ns, cells_per_sec, compiler, cpu} schema with the correct value types.

Definition in file ca_bench_json_test.cc.

Function Documentation

◆ TEST() [1/3]

TEST ( CaBenchJson  ,
CpuStringIsJsonSafe   
)

Definition at line 238 of file ca_bench_json_test.cc.

References Aleph::CA::Bench::cpu_string().

◆ TEST() [2/3]

TEST ( CaBenchJson  ,
EmitsWellFormedSchema   
)

Definition at line 191 of file ca_bench_json_test.cc.

References Aleph::CA::Bench::Bench_Result::name, and r.

◆ TEST() [3/3]

TEST ( CaBenchJson  ,
HandlesZeroAndLargeValues   
)