#include <fstream>
#include <gtest/gtest.h>
#include "interop/util/math.h"
#include "interop/logic/summary/run_summary.h"
#include "interop/logic/utils/channel.h"
#include "src/tests/interop/metrics/inc/corrected_intensity_metrics_test.h"
#include "src/tests/interop/metrics/inc/error_metrics_test.h"
#include "src/tests/interop/metrics/inc/extraction_metrics_test.h"
#include "src/tests/interop/metrics/inc/tile_metrics_test.h"
#include "src/tests/interop/metrics/inc/q_metrics_test.h"
#include "src/tests/interop/inc/abstract_regression_test_generator.h"
#include "src/tests/interop/run/info_test.h"
#include "src/tests/interop/metrics/inc/phasing_metrics_test.h"
Classes | |
struct | run_summary_tests |
struct | summary_logic |
class | run_summary_generator< Gen, SummaryLogic > |
class | summary_write_read_generator |
class | regression_test_summary_generator< Logic > |
Macros | |
#define | INTEROP_EXPECT_STAT_NEAR(EXPECTED, ACTUAL, TOL) EXPECT_TRUE(AreStatsNear(EXPECTED, ACTUAL, TOL)) |
#define | INTEROP_EXPECT_CYCLE_EQ(ACTUAL, EXPECTED) EXPECT_TRUE(AreCycleStatesNear(EXPECTED, ACTUAL)) |
Functions | |
::testing::AssertionResult | AreStatsNear (const metric_stat &expected, const metric_stat &actual, const float tol) |
::testing::AssertionResult | AreCycleStatesNear (const model::run::cycle_range &expected, const model::run::cycle_range &actual) |
TEST_P (run_summary_tests, run_summary) | |
TEST_P (run_summary_tests, read_summary) | |
TEST_P (run_summary_tests, lane_summary) | |
TEST_P (run_summary_tests, surface_summary) | |
TEST (summary_metrics_test, cycle_35_cycle_34_tile) | |
TEST (summary_metrics_test, clear_run_metrics) | |
TEST (summary_metrics_test, empty_run_metrics) | |
INSTANTIATE_TEST_CASE_P (run_summary_unit_test, run_summary_tests,::testing::ValuesIn(run_summary_unit_test_generators)) | |
INSTANTIATE_TEST_CASE_P (run_summary_regression_test, run_summary_tests, ProxyValuesIn(run_summary_regression_gen, regression_test_data::instance().files())) | |
Variables | |
run_summary_tests::generator_type | run_summary_unit_test_generators [] |
regression_test_summary_generator< summary_logic > | run_summary_regression_gen ("summary") |
Detailed Description
Unit tests for the summary metrics
- Date
- 3/11/16
- Version
- 1.0
- Copyright
- GNU Public License.
Macro Definition Documentation
#define INTEROP_EXPECT_CYCLE_EQ | ( | ACTUAL, | |
EXPECTED | |||
) | EXPECT_TRUE(AreCycleStatesNear(EXPECTED, ACTUAL)) |
#define INTEROP_EXPECT_STAT_NEAR | ( | EXPECTED, | |
ACTUAL, | |||
TOL | |||
) | EXPECT_TRUE(AreStatsNear(EXPECTED, ACTUAL, TOL)) |
Function Documentation
::testing::AssertionResult AreCycleStatesNear | ( | const model::run::cycle_range & | expected, |
const model::run::cycle_range & | actual | ||
) |
Check if two cycle states are the same.
- Parameters
-
expected expected cycle state actual actual cycle state
- Returns
- true if both are equal
::testing::AssertionResult AreStatsNear | ( | const metric_stat & | expected, |
const metric_stat & | actual, | ||
const float | tol | ||
) |
Check if two stats are nearly the same. If both are NaN, then this check succeeds
- Parameters
-
expected expected stat actual actual stat tol tolerance
- Returns
- true if both numbers hold the same value, or their difference is less than tolerance
INSTANTIATE_TEST_CASE_P | ( | run_summary_unit_test | , |
run_summary_tests | , | ||
::testing:: | ValuesInrun_summary_unit_test_generators | ||
) |
INSTANTIATE_TEST_CASE_P | ( | run_summary_regression_test | , |
run_summary_tests | , | ||
ProxyValuesIn(run_summary_regression_gen, regression_test_data::instance().files()) | |||
) |
TEST | ( | summary_metrics_test | , |
cycle_35_cycle_34_tile | |||
) |
TEST | ( | summary_metrics_test | , |
clear_run_metrics | |||
) |
TEST | ( | summary_metrics_test | , |
empty_run_metrics | |||
) |
TEST_P | ( | run_summary_tests | , |
run_summary | |||
) |
Test if calculated run summary matches actual run summary
TEST_P | ( | run_summary_tests | , |
read_summary | |||
) |
Test if calculated read summary matches actual read summary
TEST_P | ( | run_summary_tests | , |
lane_summary | |||
) |
Test if calculated lane summary matches actual lane summary
TEST_P | ( | run_summary_tests | , |
surface_summary | |||
) |
Test if calculated lane summary matches actual lane summary
Variable Documentation
regression_test_summary_generator<summary_logic> run_summary_regression_gen("summary") |
run_summary_tests::generator_type run_summary_unit_test_generators[] |
Initial value:
= {
wrap(new standard_parameter_generator<model::summary::run_summary, summary_write_read_generator>(0))
}
Definition: generic_fixture.h:100
generator_ptr< T > wrap(abstract_generator< T > *ptr)
Definition: generic_fixture.h:315
Definition: summary_metrics_test.cpp:491