2
0
Эх сурвалжийг харах

Ignore UTF8 deprecation warnings in unit tests (#8500)

Rudy Ges 6 жил өмнө
parent
commit
6dd4f2cc56

+ 2 - 1
tests/unit/compile-each.hxml

@@ -5,7 +5,8 @@
 --resource res1.txt@re/s?!%[]))("'1.txt
 --resource res2.bin@re/s?!%[]))("'1.bin
 --resource serializedValues.txt
+--macro Macro.init()
 --dce full
 -lib utest
 -D analyzer-optimize
--D analyzer-user-var-fusion
+-D analyzer-user-var-fusion

+ 12 - 0
tests/unit/src/Macro.hx

@@ -0,0 +1,12 @@
+import haxe.macro.Context;
+
+class Macro {
+	public static function init() {
+		Context.onGenerate(function(_) {
+			Context.filterMessages(msg -> switch msg {
+				case Warning("haxe.Utf8 is deprecated. Use UnicodeString instead.", _): false;
+				case _: true;
+			});
+		});
+	}
+}