Parcourir la source

Split the Json parse test from the lambda arrow test until it is fixed. Add shorcut for cpp on linux

Hugh Sanderson il y a 8 ans
Parent
commit
6bd6251c5c
2 fichiers modifiés avec 10 ajouts et 4 suppressions
  1. 8 3
      Makefile
  2. 2 1
      tests/unit/src/unit/TestJson.hx

+ 8 - 3
Makefile

@@ -150,12 +150,17 @@ else
 endif
 
 # Only use if you have only changed gencpp.ml
-quickcpp: _build/src/generators/gencpp.ml build_pass_4 copy_haxetoolkit
-_build/src/generators/gencpp.ml:src/generators/gencpp.ml
-	cp $< $@
+quickcpp: build_src build_pass_4 copy_haxetoolkit
+
+CPP_OS := $(shell uname)
+ifeq ($(CPP_OS),Linux)
+copy_haxetoolkit: 
+	sudo cp haxe /usr/bin/haxe
+else
 copy_haxetoolkit: /cygdrive/c/HaxeToolkit/haxe/haxe.exe
 /cygdrive/c/HaxeToolkit/haxe/haxe.exe:haxe.exe
 	cp $< $@
+endif
 
 haxelib:
 	(cd $(CURDIR)/extra/haxelib_src && $(CURDIR)/$(OUTPUT) client.hxml && nekotools boot run.n)

+ 2 - 1
tests/unit/src/unit/TestJson.hx

@@ -88,7 +88,8 @@ class TestJson extends Test {
 		deepId( {array: mix} );
 
 		eq( haxe.format.JsonParser.parse('"\\u00E9"'), "é" );
-		exc(() -> haxe.format.JsonParser.parse('{"""a": 1}'));
+		//exc(() -> haxe.format.JsonParser.parse('{"""a": 1}'));
+		exc( function() haxe.format.JsonParser.parse('{"""a": 1}'));
 
 		eq(haxe.format.JsonPrinter.print(Math.POSITIVE_INFINITY), "null");
 		eq(haxe.format.JsonPrinter.print(Math.NEGATIVE_INFINITY), "null");