Skip to content

Commit e8447e5

Browse files
committed
Stub out get_platform_str instead of hard coding platform
1 parent 4f76610 commit e8447e5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/test_hyp2f1.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ namespace fs = std::filesystem;
1616

1717
fs::path hyp2f1_tables_path{fs::path(XSREF_TABLES_PATH) / "scipy_special_tests" / "hyp2f1"};
1818

19+
1920
TEST_CASE("hyp2f1 complex scipy.special cases", "[hyp2f1][complex][scipy-special]") {
2021
auto [input, output, tol] = GENERATE(
2122
xsf_test_cases<
2223
std::tuple<double, double, double, std::complex<double>>, std::tuple<std::complex<double>, bool>, double>(
2324
hyp2f1_tables_path / "In_d_d_d_cd-cd.parquet", hyp2f1_tables_path / "Out_d_d_d_cd-cd.parquet",
24-
hyp2f1_tables_path / "Err_d_d_d_cd-cd_gcc-linux-x86_64.parquet"
25+
hyp2f1_tables_path / ("Err_d_d_d_cd-cd_" + get_platform_str() + ".parquet")
2526
)
2627
);
2728
auto [a, b, c, z] = input;
@@ -46,7 +47,7 @@ TEST_CASE("hyp2f1 real scipy.special cases", "[hyp2f1][real][scipy-special]") {
4647
xsf_test_cases<
4748
std::tuple<double, double, double, double>, std::tuple<double, bool>, double>(
4849
hyp2f1_tables_path / "In_d_d_d_d-d.parquet", hyp2f1_tables_path / "Out_d_d_d_d-d.parquet",
49-
hyp2f1_tables_path / "Err_d_d_d_d-d_gcc-linux-x86_64.parquet"
50+
hyp2f1_tables_path / ("Err_d_d_d_d-d_" + get_platform_str() + ".parquet")
5051
)
5152
);
5253
auto [a, b, c, z] = input;

tests/testing_utils.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,13 @@ T adjust_tolerance(T tol) {
127127
return 2 * std::max(std::numeric_limits<T>::epsilon(), tol);
128128
}
129129

130+
131+
std::string get_platform_str() {
132+
/* This is going to get a string "<compiler>-<os>-<architecture>" using conditional
133+
* compilation, but for now we're just stubbing things out. */
134+
return "gcc-linux-x86_64";
135+
}
136+
137+
138+
130139
} // namespace

0 commit comments

Comments
 (0)