@@ -653,6 +653,11 @@ struct data_t
653
653
654
654
TEST (Core_InputOutput, filestorage_base64_basic)
655
655
{
656
+ const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance ()->current_test_info ();
657
+ std::string basename = (test_info == 0 )
658
+ ? " filestorage_base64_valid_call"
659
+ : (std::string (test_info->test_case_name ()) + " --" + test_info->name ());
660
+
656
661
char const * filenames[] = {
657
662
" core_io_base64_basic_test.yml" ,
658
663
" core_io_base64_basic_test.xml" ,
@@ -662,7 +667,8 @@ TEST(Core_InputOutput, filestorage_base64_basic)
662
667
663
668
for (char const ** ptr = filenames; *ptr; ptr++)
664
669
{
665
- char const * name = *ptr;
670
+ char const * suffix_name = *ptr;
671
+ std::string name = basename + ' _' + suffix_name;
666
672
667
673
std::vector<data_t > rawdata;
668
674
@@ -809,12 +815,17 @@ TEST(Core_InputOutput, filestorage_base64_basic)
809
815
EXPECT_EQ (_rd_in.depth (), _rd_out.depth ());
810
816
EXPECT_EQ (cv::countNonZero (cv::mean (_rd_in != _rd_out)), 0 );
811
817
812
- remove (name);
818
+ remove (name. c_str () );
813
819
}
814
820
}
815
821
816
822
TEST (Core_InputOutput, filestorage_base64_valid_call)
817
823
{
824
+ const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance ()->current_test_info ();
825
+ std::string basename = (test_info == 0 )
826
+ ? " filestorage_base64_valid_call"
827
+ : (std::string (test_info->test_case_name ()) + " --" + test_info->name ());
828
+
818
829
char const * filenames[] = {
819
830
" core_io_base64_other_test.yml" ,
820
831
" core_io_base64_other_test.xml" ,
@@ -839,7 +850,8 @@ TEST(Core_InputOutput, filestorage_base64_valid_call)
839
850
840
851
for (char const ** ptr = filenames; *ptr; ptr++)
841
852
{
842
- char const * name = *ptr;
853
+ char const * suffix_name = *ptr;
854
+ std::string name = basename + ' _' + suffix_name;
843
855
844
856
EXPECT_NO_THROW (
845
857
{
@@ -897,12 +909,17 @@ TEST(Core_InputOutput, filestorage_base64_valid_call)
897
909
fs.release ();
898
910
}
899
911
900
- remove (real_name[ptr - filenames]);
912
+ remove ((basename + ' _ ' + real_name[ptr - filenames]). c_str () );
901
913
}
902
914
}
903
915
904
916
TEST (Core_InputOutput, filestorage_base64_invalid_call)
905
917
{
918
+ const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance ()->current_test_info ();
919
+ std::string basename = (test_info == 0 )
920
+ ? " filestorage_base64_invalid_call"
921
+ : (std::string (test_info->test_case_name ()) + " --" + test_info->name ());
922
+
906
923
char const * filenames[] = {
907
924
" core_io_base64_other_test.yml" ,
908
925
" core_io_base64_other_test.xml" ,
@@ -912,7 +929,8 @@ TEST(Core_InputOutput, filestorage_base64_invalid_call)
912
929
913
930
for (char const ** ptr = filenames; *ptr; ptr++)
914
931
{
915
- char const * name = *ptr;
932
+ char const * suffix_name = *ptr;
933
+ std::string name = basename + ' _' + suffix_name;
916
934
917
935
EXPECT_ANY_THROW ({
918
936
cv::FileStorage fs (name, cv::FileStorage::WRITE);
@@ -924,10 +942,10 @@ TEST(Core_InputOutput, filestorage_base64_invalid_call)
924
942
cv::FileStorage fs (name, cv::FileStorage::WRITE);
925
943
cvStartWriteStruct (*fs, " rawdata" , CV_NODE_SEQ);
926
944
cvStartWriteStruct (*fs, 0 , CV_NODE_SEQ | CV_NODE_FLOW);
927
- cvWriteRawDataBase64 (*fs, name, 1 , " u" );
945
+ cvWriteRawDataBase64 (*fs, name. c_str () , 1 , " u" );
928
946
});
929
947
930
- remove (name);
948
+ remove (name. c_str () );
931
949
}
932
950
}
933
951
@@ -1015,7 +1033,7 @@ TEST(Core_InputOutput, filestorage_vec_vec_io)
1015
1033
}
1016
1034
}
1017
1035
1018
- String fileName = " vec_test ." ;
1036
+ String fileName = " vec_vec_io_test ." ;
1019
1037
1020
1038
std::vector<String> formats;
1021
1039
formats.push_back (" xml" );
@@ -1576,7 +1594,7 @@ TEST(Core_InputOutput, FileStorage_json_bool)
1576
1594
1577
1595
TEST (Core_InputOutput, FileStorage_free_file_after_exception)
1578
1596
{
1579
- const std::string fileName = " test .yml" ;
1597
+ const std::string fileName = " FileStorage_free_file_after_exception_test .yml" ;
1580
1598
const std::string content = " %YAML:1.0\n cameraMatrix;:: !<tag:yaml.org,2002:opencv-matrix>\n " ;
1581
1599
1582
1600
fstream testFile;
0 commit comments