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

Unable to build jnaerator due to test failure #108

Open
LowWeiLin opened this issue Mar 3, 2016 · 5 comments
Open

Unable to build jnaerator due to test failure #108

LowWeiLin opened this issue Mar 3, 2016 · 5 comments

Comments

@LowWeiLin
Copy link

Hello!

I am following the instructions on building using mvn clean install, and I get the following test failure which stops the build. May I know how I can fix this? Thanks!

-------------------------------------------------------------------------------
Test set: com.ochafik.lang.jnaerator.JNAerationTest
-------------------------------------------------------------------------------
Tests run: 123, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 29.906 sec <<< FAILURE! - in com.ochafik.lang.jnaerator.JNAerationTest
test[55](com.ochafik.lang.jnaerator.JNAerationTest)  Time elapsed: 0.066 sec  <<< FAILURE!
java.lang.AssertionError: Error : com.ochafik.lang.compiler.CompilerUtils$CompilationError: Error in file:///TestJNA.java at line 9, col 17 :
    illegal start of expression

1:      import com.sun.jna.*;
2:      import com.sun.jna.ptr.*;
3:      import java.nio.*;
4:      import test.*;
5:      public class TestJNA {
6:          public static void main(String[] args) {
7:              // globals.test / JNA
8:              //#runtime(JNA)
9:>>>               import static test.TestLibrary.*;
10:         }
11:     }
Error in file:///TestJNA.java at line 9, col 24 :
    illegal start of expression

1:      import com.sun.jna.*;
2:      import com.sun.jna.ptr.*;
3:      import java.nio.*;
4:      import test.*;
5:      public class TestJNA {
6:          public static void main(String[] args) {
7:              // globals.test / JNA
8:              //#runtime(JNA)
9:>>>               import static test.TestLibrary.*;
10:         }
11:     }
Error in file:///TestJNA.java at line 9, col 35 :
    ';' expected

1:      import com.sun.jna.*;
2:      import com.sun.jna.ptr.*;
3:      import java.nio.*;
4:      import test.*;
5:      public class TestJNA {
6:          public static void main(String[] args) {
7:              // globals.test / JNA
8:              //#runtime(JNA)
9:>>>               import static test.TestLibrary.*;
10:         }
11:     }
Error in file:///TestJNA.java at line 9, col 48 :
    <identifier> expected

1:      import com.sun.jna.*;
2:      import com.sun.jna.ptr.*;
3:      import java.nio.*;
4:      import test.*;
5:      public class TestJNA {
6:          public static void main(String[] args) {
7:              // globals.test / JNA
8:              //#runtime(JNA)
9:>>>               import static test.TestLibrary.*;
10:         }
11:     }
Error in file:///TestJNA.java at line 9, col 49 :
    illegal start of expression

1:      import com.sun.jna.*;
2:      import com.sun.jna.ptr.*;
3:      import java.nio.*;
4:      import test.*;
5:      public class TestJNA {
6:          public static void main(String[] args) {
7:              // globals.test / JNA
8:              //#runtime(JNA)
9:>>>               import static test.TestLibrary.*;
10:         }
11:     }
 in :
{TestJNA.java=import com.sun.jna.*;
import com.sun.jna.ptr.*;
import java.nio.*;
import test.*;
public class TestJNA {
    public static void main(String[] args) {
        // globals.test / JNA
        //#runtime(JNA)
        import static test.TestLibrary.*;
    }
}}
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)
    at com.ochafik.lang.jnaerator.JNAerationTest$1.setFinished(JNAerationTest.java:184)
    at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1066)
    at com.ochafik.lang.jnaerator.JNAerationTest.test(JNAerationTest.java:137)


@quilombodigital
Copy link

same error here. windows 7, jdk 8

@kitguy
Copy link

kitguy commented Jul 26, 2016

same here, windows 8.1, jdk 8

@shibumi
Copy link

shibumi commented Oct 18, 2016

same here on windows 8.1, jdk 8 and jdk 7

@skylarjhdownes
Copy link

This is still an issue, I'm getting the same result on Windows 10 with JDK 1.8.0_131.

A simple workaround is to bypass the breaking tests by adding @ignore to \jnaerator\src\test\java\com\ochafik\lang\jnaerator\JNAerationTest.java
No idea if the breaking test is warning us about anything important at the moment.

ElNounch added a commit to ElNounch/JNAerator that referenced this issue Feb 20, 2022
Seems wrongly handled in jnaerator\src\test\java\com\ochafik\lang\jnaerator\JNAerationTest.java.
Test failing due to syntax error in test input itself.
Fix nativelibs4java#108
@risalfajar
Copy link

Simplest solution is to delete test folder

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

No branches or pull requests

6 participants