From: Jeff Donahue Date: Sat, 12 Apr 2014 06:47:40 +0000 (-0700) Subject: change some unnecessary TYPED_TESTs to TEST_Fs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fadbf72506934cb81762ea19afda9d555938e94;p=platform%2Fupstream%2Fcaffe.git change some unnecessary TYPED_TESTs to TEST_Fs --- diff --git a/src/caffe/test/test_split_layer.cpp b/src/caffe/test/test_split_layer.cpp index 3c17b0e..06f0f3f 100644 --- a/src/caffe/test/test_split_layer.cpp +++ b/src/caffe/test/test_split_layer.cpp @@ -155,7 +155,6 @@ TYPED_TEST(SplitLayerTest, TestGPUGradientInPlace) { } -template class SplitLayerInsertionTest : public ::testing::Test { protected: void RunInsertionTest( @@ -181,10 +180,7 @@ class SplitLayerInsertionTest : public ::testing::Test { } }; -typedef ::testing::Types InsertionDtypes; -TYPED_TEST_CASE(SplitLayerInsertionTest, InsertionDtypes); - -TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion1) { +TEST_F(SplitLayerInsertionTest, TestNoInsertion1) { const string& input_proto = "name: 'TestNetwork' " "layers: { " @@ -208,7 +204,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion1) { this->RunInsertionTest(input_proto, input_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion2) { +TEST_F(SplitLayerInsertionTest, TestNoInsertion2) { const string& input_proto = "name: 'TestNetwork' " "layers: { " @@ -245,7 +241,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion2) { this->RunInsertionTest(input_proto, input_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestNoInsertionImageNet) { +TEST_F(SplitLayerInsertionTest, TestNoInsertionImageNet) { const string& input_proto = "name: 'CaffeNet' " "layers { " @@ -566,7 +562,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestNoInsertionImageNet) { this->RunInsertionTest(input_proto, input_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestNoInsertionWithInPlace) { +TEST_F(SplitLayerInsertionTest, TestNoInsertionWithInPlace) { const string& input_proto = "name: 'TestNetwork' " "layers: { " @@ -596,7 +592,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestNoInsertionWithInPlace) { this->RunInsertionTest(input_proto, input_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestInsertion) { +TEST_F(SplitLayerInsertionTest, TestInsertion) { const string& input_proto = "name: 'TestNetwork' " "layers: { " @@ -691,7 +687,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestInsertion) { this->RunInsertionTest(input_proto, expected_output_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestInsertionTwoTop) { +TEST_F(SplitLayerInsertionTest, TestInsertionTwoTop) { const string& input_proto = "name: 'TestNetwork' " "layers: { " @@ -797,7 +793,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestInsertionTwoTop) { this->RunInsertionTest(input_proto, expected_output_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestInputInsertion) { +TEST_F(SplitLayerInsertionTest, TestInputInsertion) { const string& input_proto = "name: 'TestNetwork' " "input: 'data' " @@ -858,7 +854,7 @@ TYPED_TEST(SplitLayerInsertionTest, TestInputInsertion) { this->RunInsertionTest(input_proto, expected_output_proto); } -TYPED_TEST(SplitLayerInsertionTest, TestWithInPlace) { +TEST_F(SplitLayerInsertionTest, TestWithInPlace) { const string& input_proto = "name: 'TestNetwork' " "layers: { " diff --git a/src/caffe/test/test_upgrade_proto.cpp b/src/caffe/test/test_upgrade_proto.cpp index 323a8ae..9203f55 100644 --- a/src/caffe/test/test_upgrade_proto.cpp +++ b/src/caffe/test/test_upgrade_proto.cpp @@ -17,7 +17,6 @@ using std::string; namespace caffe { -template class PaddingLayerUpgradeTest : public ::testing::Test { protected: void RunPaddingUpgradeTest( @@ -43,10 +42,7 @@ class PaddingLayerUpgradeTest : public ::testing::Test { } }; -typedef ::testing::Types PaddingUpgradeDtypes; -TYPED_TEST_CASE(PaddingLayerUpgradeTest, PaddingUpgradeDtypes); - -TYPED_TEST(PaddingLayerUpgradeTest, TestSimple) { +TEST_F(PaddingLayerUpgradeTest, TestSimple) { const string& input_proto = "name: 'CaffeNet' " "layers { " @@ -194,7 +190,7 @@ TYPED_TEST(PaddingLayerUpgradeTest, TestSimple) { this->RunPaddingUpgradeTest(input_proto, expected_output_proto); } -TYPED_TEST(PaddingLayerUpgradeTest, TestTwoTops) { +TEST_F(PaddingLayerUpgradeTest, TestTwoTops) { const string& input_proto = "name: 'CaffeNet' " "layers { " @@ -389,7 +385,7 @@ TYPED_TEST(PaddingLayerUpgradeTest, TestTwoTops) { this->RunPaddingUpgradeTest(input_proto, expected_output_proto); } -TYPED_TEST(PaddingLayerUpgradeTest, TestImageNet) { +TEST_F(PaddingLayerUpgradeTest, TestImageNet) { const string& input_proto = "name: 'CaffeNet' " "layers { " @@ -1091,7 +1087,6 @@ TYPED_TEST(PaddingLayerUpgradeTest, TestImageNet) { this->RunPaddingUpgradeTest(input_proto, expected_output_proto); } -template class V0UpgradeTest : public ::testing::Test { protected: void RunV0UpgradeTest( @@ -1112,10 +1107,7 @@ class V0UpgradeTest : public ::testing::Test { } }; -typedef ::testing::Types V0UpgradeDtypes; -TYPED_TEST_CASE(V0UpgradeTest, V0UpgradeDtypes); - -TYPED_TEST(V0UpgradeTest, TestSimple) { +TEST_F(V0UpgradeTest, TestSimple) { const string& input_proto = "name: 'CaffeNet' " "layers { " @@ -1262,7 +1254,7 @@ TYPED_TEST(V0UpgradeTest, TestSimple) { } // Test any layer or parameter upgrades not covered by other tests. -TYPED_TEST(V0UpgradeTest, TestAllParams) { +TEST_F(V0UpgradeTest, TestAllParams) { const string& input_proto = "name: 'CaffeNet' " "input: 'input_data' " @@ -1756,7 +1748,7 @@ TYPED_TEST(V0UpgradeTest, TestAllParams) { this->RunV0UpgradeTest(input_proto, expected_output_proto); } -TYPED_TEST(V0UpgradeTest, TestImageNet) { +TEST_F(V0UpgradeTest, TestImageNet) { const string& input_proto = "name: 'CaffeNet' " "layers { "