Skip to content

Commit cc2c139

Browse files
committed
test
1 parent eb4b652 commit cc2c139

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎test/testsimplifyusing.cpp‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ class TestSimplifyUsing : public TestFixture {
7979
TEST_CASE(simplifyUsing39);
8080
TEST_CASE(simplifyUsing40);
8181
TEST_CASE(simplifyUsing41);
82+
TEST_CASE(simplifyUsing42);
83+
TEST_CASE(simplifyUsing43);
84+
TEST_CASE(simplifyUsing44);
85+
TEST_CASE(simplifyUsing45);
8286

8387
TEST_CASE(simplifyUsing8970);
8488
TEST_CASE(simplifyUsing8971);
@@ -956,6 +960,34 @@ class TestSimplifyUsing : public TestFixture {
956960
ASSERT_EQUALS(expected, tok(code));
957961
}
958962

963+
void simplifyUsing42() {
964+
const char code[] = "using A = bool;\n"
965+
"template<typename T> A func() {}\n";
966+
const char expected[] = "template < typename T > bool func ( ) { }";
967+
ASSERT_EQUALS(expected, tok(code));
968+
}
969+
970+
void simplifyUsing43() {
971+
const char code[] = "using A = bool;\n"
972+
"template<typename A> A func() {}\n";
973+
const char expected[] = "template < typename A > A func ( ) { }";
974+
ASSERT_EQUALS(expected, tok(code));
975+
}
976+
977+
void simplifyUsing44() {
978+
const char code[] = "using A = bool;\n"
979+
"template<typename T> class C { A x; }\n";
980+
const char expected[] = "template < typename T > class C { bool x ; }";
981+
ASSERT_EQUALS(expected, tok(code));
982+
}
983+
984+
void simplifyUsing45() {
985+
const char code[] = "using A = bool;\n"
986+
"template<typename A> class C { A x; }\n";
987+
const char expected[] = "template < typename A > class C { A x ; }";
988+
ASSERT_EQUALS(expected, tok(code));
989+
}
990+
959991
void simplifyUsing8970() {
960992
const char code[] = "using V = std::vector<int>;\n"
961993
"struct A {\n"

0 commit comments

Comments
 (0)