Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test naming in typed tests #903

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/test/base/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Array : public ::testing::Test {
gko::Array<T> x;
};

TYPED_TEST_SUITE(Array, gko::test::ValueAndIndexTypes);
TYPED_TEST_SUITE(Array, gko::test::ValueAndIndexTypes, TypenameNameGenerator);


TYPED_TEST(Array, CanBeCreatedWithoutAnExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/base/combination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Combination : public ::testing::Test {
std::vector<std::shared_ptr<gko::LinOp>> coefficients;
};

TYPED_TEST_SUITE(Combination, gko::test::ValueTypes);
TYPED_TEST_SUITE(Combination, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Combination, CanBeEmpty)
Expand Down
2 changes: 1 addition & 1 deletion core/test/base/composition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Composition : public ::testing::Test {
std::vector<std::shared_ptr<gko::LinOp>> operators;
};

TYPED_TEST_SUITE(Composition, gko::test::ValueTypes);
TYPED_TEST_SUITE(Composition, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Composition, CanBeEmpty)
Expand Down
3 changes: 2 additions & 1 deletion core/test/base/iterator_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class IteratorFactory : public ::testing::Test {
const std::vector<value_type> ordered_value;
};

TYPED_TEST_SUITE(IteratorFactory, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(IteratorFactory, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(IteratorFactory, EmptyIterator)
Expand Down
6 changes: 4 additions & 2 deletions core/test/base/mtx_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ class RealDummyLinOpTest : public ::testing::Test {
typename std::tuple_element<1, decltype(ValueIndexType())>::type;
};

TYPED_TEST_SUITE(RealDummyLinOpTest, gko::test::RealValueIndexTypes);
TYPED_TEST_SUITE(RealDummyLinOpTest, gko::test::RealValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(RealDummyLinOpTest, ReadsLinOpFromStream)
Expand Down Expand Up @@ -713,7 +714,8 @@ class ComplexDummyLinOpTest : public ::testing::Test {
typename std::tuple_element<1, decltype(ValueIndexType())>::type;
};

TYPED_TEST_SUITE(ComplexDummyLinOpTest, gko::test::ComplexValueIndexTypes);
TYPED_TEST_SUITE(ComplexDummyLinOpTest, gko::test::ComplexValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(ComplexDummyLinOpTest, ReadsLinOpFromStream)
Expand Down
2 changes: 1 addition & 1 deletion core/test/factorization/par_ic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ParIc : public ::testing::Test {
std::shared_ptr<const gko::ReferenceExecutor> ref;
};

TYPED_TEST_SUITE(ParIc, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(ParIc, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(ParIc, SetIterations)
Expand Down
2 changes: 1 addition & 1 deletion core/test/factorization/par_ict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ParIct : public ::testing::Test {
std::shared_ptr<const gko::ReferenceExecutor> ref;
};

TYPED_TEST_SUITE(ParIct, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(ParIct, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(ParIct, SetIterations)
Expand Down
2 changes: 1 addition & 1 deletion core/test/factorization/par_ilu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ParIlu : public ::testing::Test {
std::shared_ptr<const gko::ReferenceExecutor> ref;
};

TYPED_TEST_SUITE(ParIlu, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(ParIlu, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(ParIlu, SetIterations)
Expand Down
3 changes: 2 additions & 1 deletion core/test/factorization/par_ilut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class ParIlut : public ::testing::Test {
std::shared_ptr<const gko::ReferenceExecutor> ref;
};

TYPED_TEST_SUITE(ParIlut, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(ParIlut, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(ParIlut, SetIterations)
Expand Down
2 changes: 1 addition & 1 deletion core/test/log/convergence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace {
template <typename T>
class Convergence : public ::testing::Test {};

TYPED_TEST_SUITE(Convergence, gko::test::ValueTypes);
TYPED_TEST_SUITE(Convergence, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Convergence, CanGetData)
Expand Down
2 changes: 1 addition & 1 deletion core/test/log/papi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Papi : public ::testing::Test {
int eventset;
};

TYPED_TEST_SUITE(Papi, gko::test::ValueTypes);
TYPED_TEST_SUITE(Papi, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Papi, CatchesAllocationStarted)
Expand Down
2 changes: 1 addition & 1 deletion core/test/log/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ constexpr int num_iters = 10;
template <typename T>
class Stream : public ::testing::Test {};

TYPED_TEST_SUITE(Stream, gko::test::ValueTypes);
TYPED_TEST_SUITE(Stream, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Stream, CatchesAllocationStarted)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/coo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Coo : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Coo, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Coo, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Coo, KnowsItsSize)
Expand Down
3 changes: 2 additions & 1 deletion core/test/matrix/coo_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class CooBuilder : public ::testing::Test {
std::unique_ptr<Mtx> mtx;
};

TYPED_TEST_SUITE(CooBuilder, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(CooBuilder, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(CooBuilder, ReturnsCorrectArrays)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/csr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Csr : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Csr, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Csr, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Csr, KnowsItsSize)
Expand Down
3 changes: 2 additions & 1 deletion core/test/matrix/csr_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class CsrBuilder : public ::testing::Test {
std::unique_ptr<Mtx> mtx;
};

TYPED_TEST_SUITE(CsrBuilder, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(CsrBuilder, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(CsrBuilder, ReturnsCorrectArrays)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/dense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Dense : public ::testing::Test {
std::unique_ptr<gko::matrix::Dense<value_type>> mtx;
};

TYPED_TEST_SUITE(Dense, gko::test::ValueTypes);
TYPED_TEST_SUITE(Dense, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Dense, CanBeEmpty)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/diagonal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Diagonal : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Diagonal, gko::test::ValueTypes);
TYPED_TEST_SUITE(Diagonal, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Diagonal, KnowsItsSize)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/ell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Ell : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Ell, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Ell, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Ell, KnowsItsSize)
Expand Down
8 changes: 5 additions & 3 deletions core/test/matrix/fbcsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ class FbcsrSample : public ::testing::Test {
};


TYPED_TEST_SUITE(FbcsrSample, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(FbcsrSample, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(FbcsrSample, SampleGeneratorsAreCorrect)
Expand Down Expand Up @@ -221,7 +222,8 @@ class FbcsrSampleComplex : public ::testing::Test {
};


TYPED_TEST_SUITE(FbcsrSampleComplex, gko::test::ComplexValueIndexTypes);
TYPED_TEST_SUITE(FbcsrSampleComplex, gko::test::ComplexValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(FbcsrSampleComplex, ComplexSampleGeneratorIsCorrect)
Expand Down Expand Up @@ -319,7 +321,7 @@ class Fbcsr : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Fbcsr, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Fbcsr, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Fbcsr, GetNumBlocksCorrectlyThrows)
Expand Down
3 changes: 2 additions & 1 deletion core/test/matrix/fbcsr_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class FbcsrBuilder : public ::testing::Test {
std::unique_ptr<Mtx> mtx;
};

TYPED_TEST_SUITE(FbcsrBuilder, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(FbcsrBuilder, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(FbcsrBuilder, ReturnsCorrectArrays)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/hybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Hybrid : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Hybrid, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Hybrid, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Hybrid, KnowsItsSize)
Expand Down
4 changes: 2 additions & 2 deletions core/test/matrix/identity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Identity : public ::testing::Test {
std::shared_ptr<const gko::Executor> exec;
};

TYPED_TEST_SUITE(Identity, gko::test::ValueTypes);
TYPED_TEST_SUITE(Identity, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Identity, CanBeEmpty)
Expand Down Expand Up @@ -102,7 +102,7 @@ class IdentityFactory : public ::testing::Test {
using value_type = T;
};

TYPED_TEST_SUITE(IdentityFactory, gko::test::ValueTypes);
TYPED_TEST_SUITE(IdentityFactory, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(IdentityFactory, CanGenerateIdentityMatrix)
Expand Down
3 changes: 2 additions & 1 deletion core/test/matrix/permutation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class Permutation : public ::testing::Test {
std::unique_ptr<gko::matrix::Permutation<i_type>> mtx;
};

TYPED_TEST_SUITE(Permutation, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Permutation, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(Permutation, CanBeEmpty)
Expand Down
2 changes: 1 addition & 1 deletion core/test/matrix/sellp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Sellp : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Sellp, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(Sellp, gko::test::ValueIndexTypes, PairTypenameNameGenerator);


TYPED_TEST(Sellp, KnowsItsSize)
Expand Down
3 changes: 2 additions & 1 deletion core/test/matrix/sparsity_csr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ class SparsityCsr : public ::testing::Test {
}
};

TYPED_TEST_SUITE(SparsityCsr, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(SparsityCsr, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(SparsityCsr, KnowsItsSize)
Expand Down
3 changes: 2 additions & 1 deletion core/test/multigrid/amgx_pgm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class AmgxPgmFactory : public ::testing::Test {
std::unique_ptr<typename MgLevel::Factory> amgxpgm_factory;
};

TYPED_TEST_SUITE(AmgxPgmFactory, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(AmgxPgmFactory, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(AmgxPgmFactory, FactoryKnowsItsExecutor)
Expand Down
3 changes: 2 additions & 1 deletion core/test/preconditioner/isai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ class IsaiFactory : public ::testing::Test {
std::unique_ptr<typename UpperIsai::Factory> upper_isai_factory;
};

TYPED_TEST_SUITE(IsaiFactory, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(IsaiFactory, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(IsaiFactory, KnowsItsExecutor)
Expand Down
6 changes: 4 additions & 2 deletions core/test/preconditioner/jacobi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class JacobiFactory : public ::testing::Test {
std::shared_ptr<gko::matrix::Csr<value_type, index_type>> mtx;
};

TYPED_TEST_SUITE(JacobiFactory, gko::test::ValueIndexTypes);
TYPED_TEST_SUITE(JacobiFactory, gko::test::ValueIndexTypes,
PairTypenameNameGenerator);


TYPED_TEST(JacobiFactory, KnowsItsExecutor)
Expand Down Expand Up @@ -156,7 +157,8 @@ class BlockInterleavedStorageScheme : public ::testing::Test {
2};
};

TYPED_TEST_SUITE(BlockInterleavedStorageScheme, gko::test::IndexTypes);
TYPED_TEST_SUITE(BlockInterleavedStorageScheme, gko::test::IndexTypes,
TypenameNameGenerator);


TYPED_TEST(BlockInterleavedStorageScheme, ComputesStorageSpace)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/bicg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Bicg : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Bicg, gko::test::ValueTypes);
TYPED_TEST_SUITE(Bicg, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Bicg, BicgFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/bicgstab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Bicgstab : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Bicgstab, gko::test::ValueTypes);
TYPED_TEST_SUITE(Bicgstab, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Bicgstab, BicgstabFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/cb_gmres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ using TestTypes =
std::tuple<std::complex<double>, st_r2>,
std::tuple<std::complex<float>, st_keep>>;

TYPED_TEST_SUITE(CbGmres, TestTypes);
TYPED_TEST_SUITE(CbGmres, TestTypes, PairTypenameNameGenerator);


TYPED_TEST(CbGmres, CbGmresFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/cg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Cg : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Cg, gko::test::ValueTypes);
TYPED_TEST_SUITE(Cg, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Cg, CgFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/cgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Cgs : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Cgs, gko::test::ValueTypes);
TYPED_TEST_SUITE(Cgs, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Cgs, CgsFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/fcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Fcg : public ::testing::Test {
std::unique_ptr<gko::LinOp> solver;
};

TYPED_TEST_SUITE(Fcg, gko::test::ValueTypes);
TYPED_TEST_SUITE(Fcg, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Fcg, FcgFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/gmres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Gmres : public ::testing::Test {
template <typename T>
constexpr gko::remove_complex<T> Gmres<T>::reduction_factor;

TYPED_TEST_SUITE(Gmres, gko::test::ValueTypes);
TYPED_TEST_SUITE(Gmres, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Gmres, GmresFactoryKnowsItsExecutor)
Expand Down
2 changes: 1 addition & 1 deletion core/test/solver/idr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Idr : public ::testing::Test {
}
};

TYPED_TEST_SUITE(Idr, gko::test::ValueTypes);
TYPED_TEST_SUITE(Idr, gko::test::ValueTypes, TypenameNameGenerator);


TYPED_TEST(Idr, IdrFactoryKnowsItsExecutor)
Expand Down
Loading