Compiling Help.

Questions relating to the code on GitHub
Ironaxe
Posts: 2
Joined: Sun Jun 22, 2014 11:49 am

Compiling Help.

Postby Ironaxe » Sun Jun 22, 2014 11:56 am

Hey there. First i wanted to thank you for making such a nice Piece of Software :)
But now ive got a little Problem. I love to learn new stuff and so i tried to compile the Source myself and ran into an Error.

Im using Netbeans to Compile/Debug the Project on Windows 7 x64.
Im able to Debug the Project without any Problems. ( Everything works as expected. )
But when i try to Debug the Test Files or try to Build the Project i get 2 Errors.
I hope you can help :)

fullWrite

Code: Select all

 Expected: is <x = -6.5408y = 49.4062z = -0.14413> but: was <x = -6.5408y = 49.4062z = -0,14413>
java.lang.AssertionError
Expected: is <x = -6.5408y = 49.4062z = -0.14413>
     but: was <x = -6.5408y = 49.4062z = -0,14413>
   at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
   at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
   at com.cncsoftwaretools.autoleveller.ProbeTest.fullWrite(ProbeTest.java:148)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
   at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
   at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
   at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
   at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
   at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
   at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)


interpolateX_realValues

Code: Select all

 Expected: is <x = -20.766y = 52.4488z = -0.01624> but: was <x = -20.766y = 52.4488z = -0,01624>
java.lang.AssertionError
Expected: is <x = -20.766y = 52.4488z = -0.01624>
     but: was <x = -20.766y = 52.4488z = -0,01624>
   at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
   at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
   at com.cncsoftwaretools.autoleveller.ProbeTest.interpolateX_realValues(ProbeTest.java:134)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
   at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
   at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
   at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
   at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
   at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
   at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)

daedelus
Site Admin
Posts: 299
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: Compiling Help.

Postby daedelus » Sun Jun 22, 2014 1:46 pm

Hi Ironaxe,

You might see that your Z is being read as "z = -0,14413" rather than the expected "z = -0.14413" i.e. a comma not a dot, when my unit tests run. This is because the decimal separator is dot in the UK and other countries. In other counties a comma is used as a decimal separator and hence I can run the tests and build OK whereas you see errors.

I might be wrong but you are probably from another European country? so Java has set your Locale for this country and hence it replaces dots with commas in some places. What you need to do is skip the tests when you build the source code and you should be able to build it fine.

I dont use Netbeans myself but this might help...

http://stackoverflow.com/questions/6074 ... s-when-bui

I will fix this when I can, but for now you should be able to just skip the tests as described in the link.

Hope this helps.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James

Ironaxe
Posts: 2
Joined: Sun Jun 22, 2014 11:49 am

Re: Compiling Help.

Postby Ironaxe » Sun Jun 22, 2014 4:57 pm

Ah. ^^
OK. I will try that.
Just wondered why it failed when the values are the same. ( Did not notice the , instead of the . )
And yes. Im from Germany :D
THX allot.


Return to “Source Code Help”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest