mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-23 16:28:52 +00:00
Allow benchmarks to be specified by index with --benchmark.
This commit is contained in:
@@ -153,10 +153,19 @@ void test_benchmark_long() // --benchmark
|
||||
| 8 | 8 | U8 | F64 | 42 | 8 | 3.14 | 'S1' |
|
||||
)expected";
|
||||
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"--benchmark", "TestBench"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
{
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"--benchmark", "TestBench"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
}
|
||||
|
||||
{
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"--benchmark", "1"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
}
|
||||
}
|
||||
|
||||
void test_benchmark_short() // -b
|
||||
@@ -175,10 +184,19 @@ void test_benchmark_short() // -b
|
||||
| 8 | 8 | U8 | F64 | 42 | 8 | 3.14 | 'S1' |
|
||||
)expected";
|
||||
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"-b", "TestBench"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
{
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"-b", "TestBench"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
}
|
||||
|
||||
{
|
||||
nvbench::option_parser parser;
|
||||
parser.parse({"-b", "1"});
|
||||
const auto test = parser_to_state_string(parser);
|
||||
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
|
||||
}
|
||||
}
|
||||
|
||||
void test_int64_axis_single()
|
||||
|
||||
Reference in New Issue
Block a user