浏览代码

Fix shoco heisenleak

Jeroen van Rijn 1 年之前
父节点
当前提交
b82cfc5f15
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      tests/core/compress/test_core_compress.odin

+ 4 - 6
tests/core/compress/test_core_compress.odin

@@ -87,12 +87,10 @@ shoco_test :: proc(t: ^testing.T) {
 	}
 
 	for v in Shoco_Tests {
-		when ODIN_OS == .Windows {
-			v := v
-			// Compressed source files are not encoded with carriage returns but git replaces raw files lf with crlf on commit (on windows only)
-			// So replace crlf with lf on windows
-			v.raw, _ = bytes.replace_all(v.raw, { 0xD, 0xA }, { 0xA })
-		}
+		v := v
+		// Compressed source files are not encoded with carriage returns but git replaces raw files lf with crlf on commit (on windows only)
+		// So replace crlf with lf on windows
+		v.raw, _ = bytes.replace_all(v.raw, { 0xD, 0xA }, { 0xA }, context.temp_allocator)
 
 		expected_raw        := len(v.raw)
 		expected_compressed := len(v.compressed)