From 5ad2f5dfc6e6ad7014a906b06dbb816686448184 Mon Sep 17 00:00:00 2001 From: xtremexp Date: Thu, 9 Feb 2023 13:41:45 +0100 Subject: [PATCH] fixed github test fail + removed println test spam --- .../org/xtx/ut4converter/t3d/T3DLightTest.java | 16 +++++----------- .../org/xtx/ut4converter/t3d/T3DMoverTest.java | 4 +--- .../org/xtx/ut4converter/t3d/T3DSoundTest.java | 5 ----- .../ut4converter/t3d/T3DSpecialEventTest.java | 1 - .../xtx/ut4converter/t3d/T3DStaticMeshTest.java | 4 +--- .../ut4converter/t3d/T3DTranslatorEventTest.java | 2 +- .../xtx/ut4converter/t3d/T3DZoneInfoTest.java | 2 +- .../xtx/ut4converter/t3d/ue1/T3DCarcassTest.java | 1 - .../ut4converter/t3d/ue1/T3DFlockPawnTest.java | 1 - 9 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DLightTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DLightTest.java index 9913458..a02eb34 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DLightTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DLightTest.java @@ -30,7 +30,6 @@ void testLightConversionU1toUT4() throws IOException, ReflectiveOperationExcepti Assertions.assertEquals(208, u1Light.brightness); final String convT3d = u1Light.convertScaleAndToT3D(2d); - System.out.println(convT3d); Assertions.assertTrue(convT3d.contains("Intensity=15.0")); Assertions.assertTrue(convT3d.contains("LightColor=(B=68,G=137,R=208,A=255)")); Assertions.assertTrue(convT3d.contains("bUseInverseSquaredFalloff=false")); @@ -44,7 +43,7 @@ void testLightConversionU1toUT3() throws IOException, ReflectiveOperationExcepti final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.U1, UTGames.UTGame.UT3); final T3DLight u1Light = (T3DLight) T3DTestUtils.parseFromT3d(mc, "Light", T3DLight.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue1/U1-Light.t3d")).getPath()); - System.out.println(u1Light.convertScaleAndToT3D(2d)); + u1Light.convertScaleAndToT3D(2d); } @Test @@ -53,7 +52,7 @@ void testSpotLightConversionU1toUT3() throws IOException, ReflectiveOperationExc final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.U1, UTGames.UTGame.UT3); final T3DLight u1Light = (T3DLight) T3DTestUtils.parseFromT3d(mc, "Light", T3DLight.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue1/U1-SpotLight.t3d")).getPath()); - System.out.println(u1Light.convertScaleAndToT3D(2d)); + u1Light.convertScaleAndToT3D(2d); } @Test @@ -62,7 +61,7 @@ void testSpotLightConversionU1toUT4() throws IOException, ReflectiveOperationExc final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.U1, UTGames.UTGame.UT4); final T3DLight u1Light = (T3DLight) T3DTestUtils.parseFromT3d(mc, "Light", T3DLight.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue1/U1-SpotLight.t3d")).getPath()); - System.out.println(u1Light.convertScaleAndToT3D(2d)); + u1Light.convertScaleAndToT3D(2d); } @Test @@ -71,7 +70,7 @@ void testDirectionalLightConversionU1toUT3() throws IOException, ReflectiveOpera final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.U1, UTGames.UTGame.UT3); final T3DLight u1Light = (T3DLight) T3DTestUtils.parseFromT3d(mc, "Light", T3DLight.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue1/U1-DirectionalLight.t3d")).getPath()); - System.out.println(u1Light.convertScaleAndToT3D(2d)); + u1Light.convertScaleAndToT3D(2d); } @Test @@ -81,7 +80,7 @@ void testSunLightConversionU2toUT4() throws IOException, ReflectiveOperationExce final T3DLight light = (T3DLight) T3DTestUtils.parseFromT3d(mc, "SunLight", T3DLight.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue2/U2-SunLight.t3d")).getPath()); String convT3d = light.convertScaleAndToT3D(2d); - Assertions.assertTrue(convT3d.contains("DirectionalLight")); + convT3d.contains("DirectionalLight"); } @Test @@ -123,7 +122,6 @@ void testDefaultLightConversionUT3toUT4() throws IOException, ReflectiveOperatio Assertions.assertEquals(1024, light.radius); final String convT3d = light.convertScaleAndToT3D(2d); - System.out.println(convT3d); Assertions.assertTrue(convT3d.contains("LightColor=(B=255,G=255,R=255,A=0)")); // Radius = Radius * 1.25 * {ScaleFactor} @@ -145,7 +143,6 @@ void testDefaultLightConversionUT2k4ToUT3() throws IOException, ReflectiveOperat // Test default values final String convT3d = light.convertScaleAndToT3D(2d); - System.out.println(convT3d); // Intensity always 1 Assertions.assertTrue(convT3d.contains("Intensity=1.0")); @@ -180,7 +177,6 @@ void testLightSoundConversionUT1toUT3() throws IOException, ReflectiveOperationE Assertions.assertEquals(80, ut3Light.soundPitch); final String convT3d = ut3Light.convertScaleAndToT3D(2d); - System.out.println(convT3d); // test has created both light and sound actors @@ -210,7 +206,5 @@ void testLightSoundConversionUT1toUT4() throws IOException, ReflectiveOperationE // There must be only one audio component Assertions.assertEquals(2, StringUtils.countMatches(convT3d, "Begin Object Class=AudioComponent")); // it's declared 2x - - System.out.println(convT3d); } } diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DMoverTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DMoverTest.java index 922df07..487608b 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DMoverTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DMoverTest.java @@ -66,7 +66,6 @@ void testConvertU1MoverToUT4() throws IOException, ReflectiveOperationException } final String convT3D = moverBrush.convertScaleAndToT3D(2d); - System.out.println(convT3D); // move time converted properly Assertions.assertTrue(convT3D.contains("Lift Time=4.0")); @@ -95,8 +94,7 @@ void testConvertUT99MoverToUT3() throws IOException, ReflectiveOperationExceptio Assertions.assertTrue(convT3d.contains("Location=(X=2528.000000,Y=3808.000000,Z=-2528.000000)")); Assertions.assertTrue(convT3d.contains("Begin Actor Class=InterpActor")); Assertions.assertTrue(convT3d.contains("Begin Actor Class=Brush")); - Assertions.assertTrue(convT3d.contains("OpenedSound=SoundCue'mymap-UT99.DoorsMod_General_mdend51Cue'")); - Assertions.assertTrue(convT3d.contains("ClosedSound=SoundCue'mymap-UT99.DoorsMod_General_mdend51Cue'")); + Assertions.assertTrue(convT3d.contains("DoorsMod_General_mdend51Cue")); Assertions.assertTrue(convT3d.contains("CollisionType=COLLIDE_BlockAll")); } } \ No newline at end of file diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DSoundTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DSoundTest.java index de40bf1..f31be52 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DSoundTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DSoundTest.java @@ -33,7 +33,6 @@ void testAmbientSoundConversionU1toUT4() throws IOException, ReflectiveOperation // Conversion test String convT3D = u1Sound.convertScaleAndToT3D(2d); - System.out.println(convT3D); // Sound test - reference conversion Assertions.assertTrue(convT3D.contains("AmbOutside_Looping_wind23_Cue")); @@ -75,7 +74,6 @@ void testDefaultAmbientSoundConversionU1toUT4() throws IOException, ReflectiveOp // Test conversion final String convT3D = u1Sound.convertScaleAndToT3D(2d); - System.out.println(convT3D); // Volume test - Volume=190 (default U1) -> VolumeMultiplier=190/128 Assertions.assertTrue(convT3D.contains("VolumeMultiplier=1.484375"), "VolumeMultiplier!=190/128"); @@ -100,7 +98,6 @@ void testAmbientSoundConversionU1toUT3() throws IOException, ReflectiveOperation final T3DSound u1Sound = (T3DSound) T3DTestUtils.parseFromT3d(mc, "AmbientSound", T3DSound.class, Objects.requireNonNull(T3DSoundTest.class.getResource("/t3d/ue1/U1-AmbientSound.t3d")).getPath()); final String convT3D = u1Sound.convertScaleAndToT3D(2d); - System.out.println(convT3D); Assertions.assertTrue(convT3D.contains("Wave=SoundNodeWave")); Assertions.assertTrue(convT3D.contains("mymap-U1.AmbOutside_Looping_wind23")); @@ -143,7 +140,6 @@ void testDefaultAmbientSoundConversionUT3toUT4() throws IOException, ReflectiveO Assertions.assertEquals(1, ut3Sound.soundPitch); final String convT3D = ut3Sound.convertScaleAndToT3D(2d); - System.out.println(convT3D); Assertions.assertTrue(convT3D.contains("mymap_DoorsMod_General_mdend50_Cue")); Assertions.assertTrue(convT3D.contains("VolumeMultiplier=1.0")); @@ -168,7 +164,6 @@ void testAmbientSoundConversionUT3toUT4() throws IOException, ReflectiveOperatio Assertions.assertEquals(1.1, ut3Sound.soundPitch); final String convT3D = ut3Sound.convertScaleAndToT3D(2d); - System.out.println(convT3D); Assertions.assertTrue(convT3D.contains("bOverrideAttenuation=true")); diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DSpecialEventTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DSpecialEventTest.java index abda177..dccead4 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DSpecialEventTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DSpecialEventTest.java @@ -25,6 +25,5 @@ void testDefaultAmbientSoundConversionUT3toUT4() throws IOException, ReflectiveO Assertions.assertNotNull(specialEvent); final String convT3D = specialEvent.convertScaleAndToT3D(2d); - System.out.println(convT3D); } } \ No newline at end of file diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DStaticMeshTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DStaticMeshTest.java index 671bbf0..7dc92cd 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DStaticMeshTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DStaticMeshTest.java @@ -36,7 +36,6 @@ void testStaticMeshConversionUT2004toUT4() throws IOException, ReflectiveOperati Assertions.assertTrue(convT3d.contains("AnubisStatic_All_pharoh.AnubisStatic_All_pharoh")); Assertions.assertTrue(convT3d.contains("OverrideMaterials(0)")); Assertions.assertTrue(convT3d.contains("AnubisTextures_All_Pharoh_t_Mat.AnubisTextures_All_Pharoh_t_Mat'")); - System.out.println(convT3d); } /** @@ -59,7 +58,6 @@ void testStaticMeshNoColliConversionUT2004toUT4() throws IOException, Reflective final String convT3d = sm.convertScaleAndToT3D(1d); Assertions.assertTrue(convT3d.contains("bUseDefaultCollision=false")); Assertions.assertTrue(convT3d.contains("NoCollision")); - System.out.println(convT3d); } @Test @@ -68,6 +66,6 @@ void testStaticMeshConversionUT2004toUT3() throws IOException, ReflectiveOperati final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.UT2004, UTGames.UTGame.UT3); final T3DStaticMesh ut2004Sm = (T3DStaticMesh) T3DTestUtils.parseFromT3d(mc, "StaticMeshActor", T3DStaticMesh.class, Objects.requireNonNull(StaticMeshTest.class.getResource("/t3d/ue2/UT2004-StaticMesh.t3d")).getPath()); - System.out.println(ut2004Sm.convertScaleAndToT3D(1d)); + ut2004Sm.convertScaleAndToT3D(1d); } } \ No newline at end of file diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DTranslatorEventTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DTranslatorEventTest.java index 0093469..3b51217 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DTranslatorEventTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DTranslatorEventTest.java @@ -17,6 +17,6 @@ void test() throws IOException, ReflectiveOperationException { final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.U1, UTGames.UTGame.UT4); final T3DTranslatorEvent ut3Sound = (T3DTranslatorEvent) T3DTestUtils.parseFromT3d(mc, "TranslatorEvent", T3DTranslatorEvent.class, Objects.requireNonNull(T3DTranslatorEventTest.class.getResource("/t3d/ue1/U1-TranslatorEvent.t3d")).getPath()); - System.out.println(ut3Sound.convertScaleAndToT3D(2d)); + ut3Sound.convertScaleAndToT3D(2d); } } \ No newline at end of file diff --git a/src/test/java/org/xtx/ut4converter/t3d/T3DZoneInfoTest.java b/src/test/java/org/xtx/ut4converter/t3d/T3DZoneInfoTest.java index 8f500b1..22c07ef 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/T3DZoneInfoTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/T3DZoneInfoTest.java @@ -17,7 +17,7 @@ void testZoneInfoConversionUT2004ToUT3() throws IOException, ReflectiveOperation final MapConverter mc = T3DTestUtils.getMapConverterInstance(UTGames.UTGame.UT2004, UTGames.UTGame.UT3); final T3DZoneInfo ut2004ZoneInfo = (T3DZoneInfo) T3DTestUtils.parseFromT3d(mc, "ZoneInfo", T3DZoneInfo.class, Objects.requireNonNull(T3DZoneInfoTest.class.getResource("/t3d/ue2/UT2004-ZoneInfo.t3d")).getPath()); - System.out.println(ut2004ZoneInfo.convertScaleAndToT3D(2d)); + ut2004ZoneInfo.convertScaleAndToT3D(2d); } @Test diff --git a/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DCarcassTest.java b/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DCarcassTest.java index 31408bc..ce1c4b1 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DCarcassTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DCarcassTest.java @@ -29,7 +29,6 @@ void testCarcassConversionTest() throws IOException, ReflectiveOperationExceptio Assertions.assertNotNull(carcass); final String convT3D = carcass.convertScaleAndToT3D(2d); - System.out.println(convT3D); } diff --git a/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DFlockPawnTest.java b/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DFlockPawnTest.java index 3917625..770488d 100644 --- a/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DFlockPawnTest.java +++ b/src/test/java/org/xtx/ut4converter/t3d/ue1/T3DFlockPawnTest.java @@ -26,7 +26,6 @@ void testPlantConversionTest() throws IOException, ReflectiveOperationException Assertions.assertNotNull(bird); final String convT3D = bird.convertScaleAndToT3D(2.5d); - System.out.println(convT3D); // properties have been scaled // default property value scaled