Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to add a test for PR#1031. #1040

Open
EricBishton opened this issue Oct 26, 2020 · 0 comments
Open

Need to add a test for PR#1031. #1040

EricBishton opened this issue Oct 26, 2020 · 0 comments

Comments

@EricBishton
Copy link
Member

 class HighlightTest {

    public function new() {}

    public function testForLoop()  {
        var r = ["1", "2", "3"];
        // CORRECT USE
        for(a in r)     {var f:String = "string";}
        var x = "";

        //WRONG USE
        for(a+ in -r)   {var f:String = "string";}
        var x = "";
        
        for(a : r)      {var f:String = "string";}
        var x = "";

        for(?)          {var f:String = "string";}
        var x = "";
        
        var c = ["v1" =>"V2"];

        // CORRECT USE
        for(a => b in c)     {var f:String = "string";}
        var x = "";

        //WRONG USE
        for(a => b : b)     {var f:String = "string";}
        var x = "";

        for(a => b in !)    {var f:String = "string";}
        var x = "";

        for(a ! b in c)     {var f:String = "string";}
        var x = "";

    }
}

A new test routine in testSrc/com/intellij/plugins/haxe/lang/parser/statements/ForTest.java. The testData directory is testData/parsing/haxe/statements/for/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant