Skip to content

Commit

Permalink
[tests] Avoid (ab)using --version
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Feb 19, 2024
1 parent 03b054b commit e691535
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/misc/projects/Issue8471/Macro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import haxe.macro.Context;

class Macro {
public static function init() {
Context.info("Info", Context.currentPos());
Context.warning("This warning will disappear", Context.currentPos());

Context.onAfterTyping(afterTyping);
Expand Down
1 change: 1 addition & 0 deletions tests/misc/projects/Issue8471/Macro2.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Macro2 {
}

static function afterTyping(_) {
Context.info("Info", Context.currentPos());
Context.warning(("1" :DeprecatedType), Context.currentPos());
Context.warning("2", Context.currentPos());
Context.warning("3", Context.currentPos());
Expand Down
1 change: 0 additions & 1 deletion tests/misc/projects/Issue8471/compile.hxml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--version
--macro Macro.init()
4 changes: 2 additions & 2 deletions tests/misc/projects/Issue8471/compile2-pretty.hxml.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[WARNING] (macro) Macro2.hx:12: characters 25-39
[WARNING] (macro) Macro2.hx:13: characters 25-39

12 | Context.warning(("1" :DeprecatedType), Context.currentPos());
13 | Context.warning(("1" :DeprecatedType), Context.currentPos());
| ^^^^^^^^^^^^^^
| (WDeprecated) This typedef is deprecated in favor of String

Expand Down
1 change: 0 additions & 1 deletion tests/misc/projects/Issue8471/compile2.hxml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--version
--macro Macro2.init()
2 changes: 1 addition & 1 deletion tests/misc/projects/Issue8471/compile2.hxml.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Macro2.hx:12: characters 25-39 : Warning : (WDeprecated) This typedef is deprecated in favor of String
Macro2.hx:13: characters 25-39 : Warning : (WDeprecated) This typedef is deprecated in favor of String
Warning : 1
Warning : 2
Warning : 3
Expand Down

0 comments on commit e691535

Please sign in to comment.