Quellcode durchsuchen

[xml] Enable tests.

Jeroen van Rijn vor 3 Jahren
Ursprung
Commit
127b0ba65e
2 geänderte Dateien mit 24 neuen und 7 gelöschten Zeilen
  1. 9 7
      tests/core/build.bat
  2. 15 0
      tests/core/encoding/xml/test_core_xml.odin

+ 9 - 7
tests/core/build.bat

@@ -1,5 +1,6 @@
 @echo off
-set COMMON=-show-timings -no-bounds-check -vet -strict-style -collection:tests=..
+set COMMON=-no-bounds-check -vet -strict-style
+set COLLECTION=-collection:tests=..
 set PATH_TO_ODIN==..\..\odin
 python3 download_assets.py
 echo ---
@@ -35,9 +36,10 @@ echo ---
 echo ---
 echo Running core:encoding tests
 echo ---
-%PATH_TO_ODIN% run encoding/hxa %COMMON% -out:test_hxa.exe
-%PATH_TO_ODIN% run encoding/json %COMMON% -out:test_json.exe
+%PATH_TO_ODIN% run encoding/hxa    %COMMON% %COLLECTION% -out:test_hxa.exe
+%PATH_TO_ODIN% run encoding/json   %COMMON% -out:test_json.exe
 %PATH_TO_ODIN% run encoding/varint %COMMON% -out:test_varint.exe
+%PATH_TO_ODIN% run encoding/xml    %COMMON% -out:test_xml.exe
 
 echo ---
 echo Running core:math/noise tests
@@ -47,19 +49,19 @@ echo ---
 echo ---
 echo Running core:math tests
 echo ---
-%PATH_TO_ODIN% run math %COMMON% -out:test_core_math.exe
+%PATH_TO_ODIN% run math %COMMON% %COLLECTION% -out:test_core_math.exe
 
 echo ---
 echo Running core:math/linalg/glsl tests
 echo ---
-%PATH_TO_ODIN% run math/linalg/glsl %COMMON% -out:test_linalg_glsl.exe
+%PATH_TO_ODIN% run math/linalg/glsl %COMMON% %COLLECTION% -out:test_linalg_glsl.exe
 
 echo ---
 echo Running core:path/filepath tests
 echo ---
-%PATH_TO_ODIN% run path/filepath %COMMON% -out:test_core_filepath.exe
+%PATH_TO_ODIN% run path/filepath %COMMON% %COLLECTION% -out:test_core_filepath.exe
 
 echo ---
 echo Running core:reflect tests
 echo ---
-%PATH_TO_ODIN% run reflect %COMMON% -out:test_core_reflect.exe
+%PATH_TO_ODIN% run reflect %COMMON% %COLLECTION% -out:test_core_reflect.exe

+ 15 - 0
tests/core/encoding/xml/test_core_xml.odin

@@ -168,6 +168,21 @@ TESTS :: []TEST{
 		err       = .Invalid_DocType,
 		crc32     = 0x49b83d0a,
 	},
+
+	/*
+		Parse the 8.2 MiB unicode.xml for good measure.
+	*/
+	{
+		filename  = "unicode.xml",
+		options   = {
+			flags            = {
+				.Ignore_Unsupported,
+			},
+			expected_doctype = "",
+		},
+		err       = .None,
+		crc32     = 0xcaa042b9,
+	},
 }
 
 when ODIN_TEST {