Browse Source

Reusing path to temporary file in text encoding test.

David Piuva 5 years ago
parent
commit
3b6b24774c

File diff suppressed because it is too large
+ 0 - 7
Source/SDK/sandbox/media/images/Character_Mage.ini


+ 9 - 9
Source/SDK/sandbox/media/images/Floor.ini

@@ -1,9 +1,9 @@
-; Sprite configuration file
-CenterX=103
-CenterY=55
-FrameRows=4
-PropertyColumns=3
-MinBound=-0.5,-0.068627,-0.5
-MaxBound=0.5,0.068627,0.5
-Points=-0.485,-0.02,-0.485, -0.485,-0.02,0.485, -0.485,0.02,-0.485, -0.485,0.02,0.485, 0.485,-0.02,-0.485, 0.485,-0.02,0.485, 0.485,0.02,-0.485, 0.485,0.02,0.485
-TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1
+; Sprite configuration file
+CenterX=103
+CenterY=55
+FrameRows=4
+PropertyColumns=3
+MinBound=-0.5,-0.068627,-0.5
+MaxBound=0.5,0.068627,0.5
+Points=-0.485,-0.02,-0.485, -0.485,-0.02,0.485, -0.485,0.02,-0.485, -0.485,0.02,0.485, 0.485,-0.02,-0.485, 0.485,-0.02,0.485, 0.485,0.02,-0.485, 0.485,0.02,0.485
+TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1

+ 9 - 9
Source/SDK/sandbox/media/images/Pillar.ini

@@ -1,9 +1,9 @@
-; Sprite configuration file
-CenterX=34
-CenterY=139
-FrameRows=1
-PropertyColumns=3
-MinBound=-0.228904,0,-0.226749
-MaxBound=0.22765,1,0.228414
-Points=0,1,0, 0,1,0.15, 0.106066,1,0.106066, 0.15,1,-0, 0.106066,1,-0.106066, -0,1,-0.15, -0.106066,1,-0.106066, -0.15,1,0, -0.106066,1,0.106066, 0,0,0, 0,0,0.15, 0.106066,0,0.106066, 0.15,0,-0, 0.106066,0,-0.106066, -0,0,-0.15, -0.106066,0,-0.106066, -0.15,0,0, -0.106066,0,0.106066
-TriangleIndices=0,1,2, 9,11,10, 2,1,10, 2,10,11, 0,2,3, 9,12,11, 3,2,11, 3,11,12, 0,3,4, 9,13,12, 4,3,12, 4,12,13, 0,4,5, 9,14,13, 5,4,13, 5,13,14, 0,5,6, 9,15,14, 6,5,14, 6,14,15, 0,6,7, 9,16,15, 7,6,15, 7,15,16, 0,7,8, 9,17,16, 8,7,16, 8,16,17, 0,8,1, 9,10,17, 1,8,17, 1,17,10
+; Sprite configuration file
+CenterX=34
+CenterY=139
+FrameRows=1
+PropertyColumns=3
+MinBound=-0.228904,0,-0.226749
+MaxBound=0.22765,1,0.228414
+Points=0,1,0, 0,1,0.15, 0.106066,1,0.106066, 0.15,1,-0, 0.106066,1,-0.106066, -0,1,-0.15, -0.106066,1,-0.106066, -0.15,1,0, -0.106066,1,0.106066, 0,0,0, 0,0,0.15, 0.106066,0,0.106066, 0.15,0,-0, 0.106066,0,-0.106066, -0,0,-0.15, -0.106066,0,-0.106066, -0.15,0,0, -0.106066,0,0.106066
+TriangleIndices=0,1,2, 9,11,10, 2,1,10, 2,10,11, 0,2,3, 9,12,11, 3,2,11, 3,11,12, 0,3,4, 9,13,12, 4,3,12, 4,12,13, 0,4,5, 9,14,13, 5,4,13, 5,13,14, 0,5,6, 9,15,14, 6,5,14, 6,14,15, 0,6,7, 9,16,15, 7,6,15, 7,15,16, 0,7,8, 9,17,16, 8,7,16, 8,16,17, 0,8,1, 9,10,17, 1,8,17, 1,17,10

+ 9 - 9
Source/SDK/sandbox/media/images/WoodenBarrel.ini

@@ -1,9 +1,9 @@
-; Sprite configuration file
-CenterX=45
-CenterY=105
-FrameRows=2
-PropertyColumns=3
-MinBound=-0.29699,-0.007505,-0.296953
-MaxBound=0.296959,0.690016,0.297297
-Points=-0.101955,0.005653,0.176591, -0.127409,0.191989,0.220679, 0,0.191989,0.254818, 0,0.005653,0.20391, 0.176591,0.005653,0.101955, 0.220679,0.191989,0.127409, 0.254818,0.191989,0, 0.20391,0.005653,0, 0.220679,0.191989,-0.127409, 0.176591,0.005653,-0.101955, 0.127409,0.191989,-0.220679, 0.101955,0.005653,-0.176591, 0,0.191989,-0.254818, 0,0.005653,-0.20391, -0.127409,0.191989,-0.220679, -0.101955,0.005653,-0.176591, -0.220679,0.191989,-0.127409, -0.176591,0.005653,-0.101955, -0.254818,0.191989,0, -0.20391,0.005653,0, -0.220679,0.191989,0.127409, -0.176591,0.005653,0.101955, 0.113823,0.588704,0.197147, 0,0.588704,0.227646, -0.113823,0.588704,0.197147, -0.197147,0.588704,0.113823, -0.227646,0.588704,0, -0.197147,0.588704,-0.113823, -0.113823,0.588704,-0.197147, 0,0.588704,-0.227646, 0.113823,0.588704,-0.197147, 0.197147,0.588704,-0.113823, 0.227646,0.588704,0, 0.197147,0.588704,0.113823, 0.127409,0.191989,0.220679, 0.101955,0.005653,0.176591, -0.220679,0.482219,0.127409, -0.127409,0.482219,0.220679, -0.254818,0.482219,0, -0.220679,0.482219,-0.127409, -0.127409,0.482219,-0.220679, 0,0.482219,-0.254818, 0.127409,0.482219,-0.220679, 0.220679,0.482219,-0.127409, 0.254818,0.482219,0, 0.220679,0.482219,0.127409, 0.127409,0.482219,0.220679, 0,0.482219,0.254818
-TriangleIndices=3,2,1, 3,1,0, 7,6,5, 7,5,4, 9,8,6, 9,6,7, 11,10,8, 11,8,9, 13,12,10, 13,10,11, 15,14,12, 15,12,13, 17,16,14, 17,14,15, 19,18,16, 19,16,17, 21,20,18, 21,18,19, 0,1,20, 0,20,21, 24,23,22, 25,24,22, 26,25,22, 27,26,22, 28,27,22, 29,28,22, 30,29,22, 31,30,22, 32,31,22, 33,32,22, 35,34,2, 35,2,3, 4,35,3, 7,4,3, 9,7,3, 11,9,3, 13,11,3, 15,13,3, 17,15,3, 19,17,3, 21,19,3, 0,21,3, 4,5,34, 4,34,35, 37,24,25, 37,25,36, 36,25,26, 36,26,38, 38,26,27, 38,27,39, 39,27,28, 39,28,40, 40,28,29, 40,29,41, 41,29,30, 41,30,42, 42,30,31, 42,31,43, 43,31,32, 43,32,44, 44,32,33, 44,33,45, 45,33,22, 45,22,46, 46,22,23, 46,23,47, 1,2,47, 1,47,37, 20,1,37, 20,37,36, 18,20,36, 18,36,38, 16,18,38, 16,38,39, 14,16,39, 14,39,40, 12,14,40, 12,40,41, 10,12,41, 10,41,42, 8,10,42, 8,42,43, 6,8,43, 6,43,44, 5,6,44, 5,44,45, 34,5,45, 34,45,46, 2,34,46, 2,46,47, 47,23,24, 47,24,37
+; Sprite configuration file
+CenterX=45
+CenterY=105
+FrameRows=2
+PropertyColumns=3
+MinBound=-0.29699,-0.007505,-0.296953
+MaxBound=0.296959,0.690016,0.297297
+Points=-0.101955,0.005653,0.176591, -0.127409,0.191989,0.220679, 0,0.191989,0.254818, 0,0.005653,0.20391, 0.176591,0.005653,0.101955, 0.220679,0.191989,0.127409, 0.254818,0.191989,0, 0.20391,0.005653,0, 0.220679,0.191989,-0.127409, 0.176591,0.005653,-0.101955, 0.127409,0.191989,-0.220679, 0.101955,0.005653,-0.176591, 0,0.191989,-0.254818, 0,0.005653,-0.20391, -0.127409,0.191989,-0.220679, -0.101955,0.005653,-0.176591, -0.220679,0.191989,-0.127409, -0.176591,0.005653,-0.101955, -0.254818,0.191989,0, -0.20391,0.005653,0, -0.220679,0.191989,0.127409, -0.176591,0.005653,0.101955, 0.113823,0.588704,0.197147, 0,0.588704,0.227646, -0.113823,0.588704,0.197147, -0.197147,0.588704,0.113823, -0.227646,0.588704,0, -0.197147,0.588704,-0.113823, -0.113823,0.588704,-0.197147, 0,0.588704,-0.227646, 0.113823,0.588704,-0.197147, 0.197147,0.588704,-0.113823, 0.227646,0.588704,0, 0.197147,0.588704,0.113823, 0.127409,0.191989,0.220679, 0.101955,0.005653,0.176591, -0.220679,0.482219,0.127409, -0.127409,0.482219,0.220679, -0.254818,0.482219,0, -0.220679,0.482219,-0.127409, -0.127409,0.482219,-0.220679, 0,0.482219,-0.254818, 0.127409,0.482219,-0.220679, 0.220679,0.482219,-0.127409, 0.254818,0.482219,0, 0.220679,0.482219,0.127409, 0.127409,0.482219,0.220679, 0,0.482219,0.254818
+TriangleIndices=3,2,1, 3,1,0, 7,6,5, 7,5,4, 9,8,6, 9,6,7, 11,10,8, 11,8,9, 13,12,10, 13,10,11, 15,14,12, 15,12,13, 17,16,14, 17,14,15, 19,18,16, 19,16,17, 21,20,18, 21,18,19, 0,1,20, 0,20,21, 24,23,22, 25,24,22, 26,25,22, 27,26,22, 28,27,22, 29,28,22, 30,29,22, 31,30,22, 32,31,22, 33,32,22, 35,34,2, 35,2,3, 4,35,3, 7,4,3, 9,7,3, 11,9,3, 13,11,3, 15,13,3, 17,15,3, 19,17,3, 21,19,3, 0,21,3, 4,5,34, 4,34,35, 37,24,25, 37,25,36, 36,25,26, 36,26,38, 38,26,27, 38,27,39, 39,27,28, 39,28,40, 40,28,29, 40,29,41, 41,29,30, 41,30,42, 42,30,31, 42,31,43, 43,31,32, 43,32,44, 44,32,33, 44,33,45, 45,33,22, 45,22,46, 46,22,23, 46,23,47, 1,2,47, 1,47,37, 20,1,37, 20,37,36, 18,20,36, 18,36,38, 16,18,38, 16,38,39, 14,16,39, 14,39,40, 12,14,40, 12,40,41, 10,12,41, 10,41,42, 8,10,42, 8,42,43, 6,8,43, 6,43,44, 5,6,44, 5,44,45, 34,5,45, 34,45,46, 2,34,46, 2,46,47, 47,23,24, 47,24,37

+ 9 - 9
Source/SDK/sandbox/media/images/WoodenFence.ini

@@ -1,9 +1,9 @@
-; Sprite configuration file
-CenterX=54
-CenterY=154
-FrameRows=2
-PropertyColumns=3
-MinBound=-0.5,0,-0.024412
-MaxBound=0.5,1,0.024412
-Points=-0.47,0.03,0.005, -0.47,0.97,0.005, -0.47,0.03,-0.005, -0.47,0.97,-0.005, 0.47,0.03,0.005, 0.47,0.97,0.005, 0.47,0.03,-0.005, 0.47,0.97,-0.005
-TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1
+; Sprite configuration file
+CenterX=54
+CenterY=154
+FrameRows=2
+PropertyColumns=3
+MinBound=-0.5,0,-0.024412
+MaxBound=0.5,1,0.024412
+Points=-0.47,0.03,0.005, -0.47,0.97,0.005, -0.47,0.03,-0.005, -0.47,0.97,-0.005, 0.47,0.03,0.005, 0.47,0.97,0.005, 0.47,0.03,-0.005, 0.47,0.97,-0.005
+TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1

+ 9 - 9
Source/SDK/sandbox/media/images/WoodenFloor.ini

@@ -1,9 +1,9 @@
-; Sprite configuration file
-CenterX=104
-CenterY=57
-FrameRows=2
-PropertyColumns=3
-MinBound=-0.5,-0.048824,-0.5
-MaxBound=0.5,0.048824,0.5
-Points=-0.485,-0.02,-0.485, -0.485,-0.02,0.485, -0.485,0.02,-0.485, -0.485,0.02,0.485, 0.485,-0.02,-0.485, 0.485,-0.02,0.485, 0.485,0.02,-0.485, 0.485,0.02,0.485
-TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1
+; Sprite configuration file
+CenterX=104
+CenterY=57
+FrameRows=2
+PropertyColumns=3
+MinBound=-0.5,-0.048824,-0.5
+MaxBound=0.5,0.048824,0.5
+Points=-0.485,-0.02,-0.485, -0.485,-0.02,0.485, -0.485,0.02,-0.485, -0.485,0.02,0.485, 0.485,-0.02,-0.485, 0.485,-0.02,0.485, 0.485,0.02,-0.485, 0.485,0.02,0.485
+TriangleIndices=3,2,0, 3,0,1, 6,7,5, 6,5,4, 2,6,4, 2,4,0, 7,3,1, 7,1,5, 3,7,6, 3,6,2, 0,4,5, 0,5,1

+ 5 - 4
Source/test/tests/TextEncodingTest.cpp

@@ -118,13 +118,14 @@ START_TEST(TextEncoding)
 	}
 	}
 	{ // Saving text to files
 	{ // Saving text to files
 		String originalContent = U"Hello my friend\n你好我的朋友";
 		String originalContent = U"Hello my friend\n你好我的朋友";
+		String tempPath = folderPath + U"Temporary.txt";
 		
 		
 		// Latin-1 should write ? for complex characters
 		// Latin-1 should write ? for complex characters
-		string_save(folderPath + U"Saved_Latin1.txt", originalContent, CharacterEncoding::Raw_Latin1, LineEncoding::CrLf);
-		ASSERT_MATCH(string_load(folderPath + U"Saved_Latin1.txt", true), U"Hello my friend\n??????");
+		string_save(tempPath, originalContent, CharacterEncoding::Raw_Latin1, LineEncoding::CrLf);
+		ASSERT_MATCH(string_load(tempPath, true), U"Hello my friend\n??????");
 		
 		
 		// UFT-8 should store the Chinese characters correctly
 		// UFT-8 should store the Chinese characters correctly
-		string_save(folderPath + U"Saved_UTF8.txt", originalContent, CharacterEncoding::BOM_UTF8, LineEncoding::CrLf);
-		ASSERT_MATCH(string_load(folderPath + U"Saved_UTF8.txt", true), originalContent);
+		string_save(tempPath, originalContent, CharacterEncoding::BOM_UTF8, LineEncoding::CrLf);
+		ASSERT_MATCH(string_load(tempPath, true), originalContent);
 	}
 	}
 END_TEST
 END_TEST

+ 0 - 2
Source/test/tests/resources/Saved_Latin1.txt

@@ -1,2 +0,0 @@
-Hello my friend
-??????

+ 0 - 2
Source/test/tests/resources/Saved_UTF8.txt

@@ -1,2 +0,0 @@
-Hello my friend
-你好我的朋友

Some files were not shown because too many files changed in this diff