luhsra / MinimaxSimulator

Platform independent GUI-based Minimax simulator
https://luhsra.github.io/MinimaxSimulator/
MIT License
7 stars 5 forks source link

1 Test Failing on MacOs Monterey #62

Open nilsmartel opened 2 years ago

nilsmartel commented 2 years ago
❯ MacBook Pro (15 Zoll, 2019)
❯ OS: MacOs Monterey
❯ java -version
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

A single Test is failing, preventing the building of a jar file, here's the output

[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.023 s <<< FAILURE! - in de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest
[ERROR] testGetStringDimension(de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest)  Time elapsed: 0.002 s  <<< FAILURE!
java.lang.AssertionError: dimension of "Test" expected:<[36,13]> but was:<[31,13]>
        at de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest.testGetStringDimension(TextRenderShapeTest.java:62)
prohde commented 2 years ago

Looks like the font got a little smaller. You can build the JAR file by skipping the tests: mvn clean package -DskipTests

nilsmartel commented 2 years ago

thanks for the swift answer

prohde commented 2 years ago

I created a PR changing the test to a test for not being the zero dimension instead. I guess it is not necessary to check for some hard-coded dimension.

nilsmartel commented 2 years ago

I think that's quite a clever idea. Testing is really hard and I think seeing how you react to this challenge made me learn something myself