From c1fd11697c252a5f4e832f9ec94c943bd1d16e51 Mon Sep 17 00:00:00 2001 From: Shnupbups Date: Sun, 31 Jan 2021 00:44:00 +1100 Subject: [PATCH] test stuff (#1991) --- mappings/net/minecraft/test/GameTest.mapping | 17 +++++++ .../test/NotEnoughSuccessesError.mapping | 5 +++ .../test/StructureTestListener.mapping | 45 +++++++++++++++++++ .../minecraft/test/StructureTestUtil.mapping | 21 +++++++++ .../test/TestCompletionListener.mapping | 3 ++ .../minecraft/test/TestFailureLogger.mapping | 6 +++ .../net/minecraft/test/TestFunction.mapping | 7 +++ .../net/minecraft/test/TestFunctions.mapping | 7 +++ .../net/minecraft/test/TestListener.mapping | 2 + .../net/minecraft/test/TestRunner.mapping | 9 ++++ mappings/net/minecraft/test/TestSet.mapping | 7 +++ mappings/net/minecraft/test/TestUtil.mapping | 9 ++++ 12 files changed, 138 insertions(+) create mode 100644 mappings/net/minecraft/test/NotEnoughSuccessesError.mapping create mode 100644 mappings/net/minecraft/test/StructureTestListener.mapping create mode 100644 mappings/net/minecraft/test/TestFailureLogger.mapping diff --git a/mappings/net/minecraft/test/GameTest.mapping b/mappings/net/minecraft/test/GameTest.mapping index 35834c6371..276a311b8f 100644 --- a/mappings/net/minecraft/test/GameTest.mapping +++ b/mappings/net/minecraft/test/GameTest.mapping @@ -7,16 +7,27 @@ CLASS net/minecraft/class_4517 net/minecraft/test/GameTest FIELD field_20565 started Z FIELD field_20567 completed Z FIELD field_20569 throwable Ljava/lang/Throwable; + FIELD field_21452 timedTaskRunners Ljava/util/Collection; FIELD field_21454 expectedStopTime J + FIELD field_21455 tick J FIELD field_21456 stopwatch Lcom/google/common/base/Stopwatch; + FIELD field_25301 rotation Lnet/minecraft/class_2470; + FIELD field_27805 structureBlockEntity Lnet/minecraft/class_2633; + METHOD (Lnet/minecraft/class_4529;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;)V + ARG 1 testFunction + ARG 2 rotation + ARG 3 world METHOD method_22165 tick ()V METHOD method_22166 init (Lnet/minecraft/class_2338;I)V + ARG 1 pos METHOD method_22167 addListener (Lnet/minecraft/class_4518;)V ARG 1 listener METHOD method_22168 fail (Ljava/lang/Throwable;)V ARG 1 throwable METHOD method_22169 getStructurePath ()Ljava/lang/String; METHOD method_22172 getPos ()Lnet/minecraft/class_2338; + METHOD method_22175 (Lnet/minecraft/class_4518;)V + ARG 1 listener METHOD method_22176 getWorld ()Lnet/minecraft/class_3218; METHOD method_22177 isPassed ()Z METHOD method_22178 isFailed ()Z @@ -31,3 +42,9 @@ CLASS net/minecraft/class_4517 net/minecraft/test/GameTest METHOD method_23638 getStructureName ()Ljava/lang/String; METHOD method_23639 start ()V METHOD method_23640 complete ()V + METHOD method_29402 getRotation ()Lnet/minecraft/class_2470; + METHOD method_29403 getTestFunction ()Lnet/minecraft/class_4529; + METHOD method_32240 clearArea ()V + METHOD method_32241 isFlaky ()Z + METHOD method_32242 getMaxAttempts ()I + METHOD method_32243 getRequiredSuccesses ()I diff --git a/mappings/net/minecraft/test/NotEnoughSuccessesError.mapping b/mappings/net/minecraft/test/NotEnoughSuccessesError.mapping new file mode 100644 index 0000000000..d73f3e18e7 --- /dev/null +++ b/mappings/net/minecraft/test/NotEnoughSuccessesError.mapping @@ -0,0 +1,5 @@ +CLASS net/minecraft/class_5622 net/minecraft/test/NotEnoughSuccessesError + METHOD (IILnet/minecraft/class_4517;)V + ARG 1 attempts + ARG 2 successes + ARG 3 test diff --git a/mappings/net/minecraft/test/StructureTestListener.mapping b/mappings/net/minecraft/test/StructureTestListener.mapping new file mode 100644 index 0000000000..d5640e927a --- /dev/null +++ b/mappings/net/minecraft/test/StructureTestListener.mapping @@ -0,0 +1,45 @@ +CLASS net/minecraft/class_5624 net/minecraft/test/StructureTestListener + FIELD field_27808 attempt I + FIELD field_27809 successes I + FIELD field_27810 test Lnet/minecraft/class_4517; + FIELD field_27811 testManager Lnet/minecraft/class_4521; + FIELD field_27812 pos Lnet/minecraft/class_2338; + METHOD (Lnet/minecraft/class_4517;Lnet/minecraft/class_4521;Lnet/minecraft/class_2338;)V + ARG 1 test + ARG 2 testManager + ARG 3 pos + METHOD method_32246 init ()V + METHOD method_32247 addGameTestMarker (Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/lang/String;)V + ARG 0 world + ARG 1 pos + ARG 2 message + METHOD method_32248 sendMessageToAllPlayers (Lnet/minecraft/class_3218;Lnet/minecraft/class_124;Ljava/lang/String;)V + ARG 0 world + ARG 1 formatting + ARG 2 message + METHOD method_32249 (Lnet/minecraft/class_3222;)Z + ARG 0 player + METHOD method_32250 (Ljava/lang/String;Lnet/minecraft/class_124;Lnet/minecraft/class_3222;)V + ARG 2 player + METHOD method_32251 createBookWithText (Ljava/lang/String;ZLjava/lang/String;)Lnet/minecraft/class_1799; + ARG 0 text + ARG 1 required + ARG 2 output + METHOD method_32253 visualizeTest (Lnet/minecraft/class_4517;Lnet/minecraft/class_2248;)V + ARG 0 test + ARG 1 block + METHOD method_32254 failTest (Lnet/minecraft/class_4517;Ljava/lang/Throwable;)V + ARG 0 test + ARG 1 output + METHOD method_32255 finishFailedTest (Lnet/minecraft/class_4517;Ljava/lang/Throwable;)V + ARG 0 test + ARG 1 output + METHOD method_32256 createTestOutputLectern (Lnet/minecraft/class_4517;Ljava/lang/String;)V + ARG 0 test + ARG 1 output + METHOD method_33320 passTest (Lnet/minecraft/class_4517;Ljava/lang/String;)V + ARG 0 test + ARG 1 output + METHOD method_33321 finishPassedTest (Lnet/minecraft/class_4517;Ljava/lang/String;)V + ARG 0 test + ARG 1 output diff --git a/mappings/net/minecraft/test/StructureTestUtil.mapping b/mappings/net/minecraft/test/StructureTestUtil.mapping index 556563ec30..1d87ea2d8e 100644 --- a/mappings/net/minecraft/test/StructureTestUtil.mapping +++ b/mappings/net/minecraft/test/StructureTestUtil.mapping @@ -1,5 +1,8 @@ CLASS net/minecraft/class_4525 net/minecraft/test/StructureTestUtil FIELD field_20579 testStructuresDirectoryName Ljava/lang/String; + FIELD field_27813 LOGGER Lorg/apache/logging/log4j/Logger; + METHOD method_22241 (Lnet/minecraft/class_1297;)Z + ARG 0 entity METHOD method_22242 getStructureBoundingBox (Lnet/minecraft/class_2633;)Lnet/minecraft/class_238; ARG 0 structureBlockEntity METHOD method_22244 findContainingStructureBlock (Lnet/minecraft/class_2338;ILnet/minecraft/class_3218;)Ljava/util/Optional; @@ -14,16 +17,28 @@ CLASS net/minecraft/class_4525 net/minecraft/test/StructureTestUtil ARG 1 pos ARG 2 world METHOD method_22248 placeStartButton (Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;)V + ARG 2 rotation + ARG 3 world + METHOD method_22250 createStructure (Ljava/lang/String;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;ILnet/minecraft/class_3218;Z)Lnet/minecraft/class_2633; + ARG 0 structureName + ARG 1 pos + ARG 2 rotation + ARG 4 world METHOD method_22251 createTestArea (Ljava/lang/String;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;)V ARG 0 structure ARG 1 pos ARG 2 size + ARG 3 rotation ARG 4 world METHOD method_22252 placeStructure (Ljava/lang/String;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;Z)Lnet/minecraft/class_2633; ARG 0 name ARG 1 pos + ARG 2 rotation + ARG 3 world METHOD method_22253 loadSnbt (Ljava/nio/file/Path;)Lnet/minecraft/class_2487; ARG 0 path + METHOD method_22254 (ILnet/minecraft/class_3218;Lnet/minecraft/class_2338;)V + ARG 2 pos METHOD method_22255 findNearestStructureBlock (Lnet/minecraft/class_2338;ILnet/minecraft/class_3218;)Lnet/minecraft/class_2338; ARG 0 pos ARG 1 radius @@ -42,3 +57,9 @@ CLASS net/minecraft/class_4525 net/minecraft/test/StructureTestUtil METHOD method_22369 createStructure (Ljava/lang/String;Lnet/minecraft/class_3218;)Lnet/minecraft/class_3499; ARG 0 structureId ARG 1 world + METHOD method_29408 getRotation (I)Lnet/minecraft/class_2470; + ARG 0 steps + METHOD method_29409 getStructureBlockBox (Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;)Lnet/minecraft/class_3341; + ARG 2 rotation + METHOD method_29410 getStructureBlockBox (Lnet/minecraft/class_2633;)Lnet/minecraft/class_3341; + ARG 0 structureBlockEntity diff --git a/mappings/net/minecraft/test/TestCompletionListener.mapping b/mappings/net/minecraft/test/TestCompletionListener.mapping index 8539f95cc9..c95e6a78f8 100644 --- a/mappings/net/minecraft/test/TestCompletionListener.mapping +++ b/mappings/net/minecraft/test/TestCompletionListener.mapping @@ -1,2 +1,5 @@ CLASS net/minecraft/class_4531 net/minecraft/test/TestCompletionListener METHOD method_22304 onTestFailed (Lnet/minecraft/class_4517;)V + ARG 1 test + METHOD method_33322 onTestPassed (Lnet/minecraft/class_4517;)V + ARG 1 test diff --git a/mappings/net/minecraft/test/TestFailureLogger.mapping b/mappings/net/minecraft/test/TestFailureLogger.mapping new file mode 100644 index 0000000000..9e174abc98 --- /dev/null +++ b/mappings/net/minecraft/test/TestFailureLogger.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_5623 net/minecraft/test/TestFailureLogger + FIELD field_27807 completionListener Lnet/minecraft/class_4531; + METHOD method_32245 failTest (Lnet/minecraft/class_4517;)V + ARG 0 test + METHOD method_33319 passTest (Lnet/minecraft/class_4517;)V + ARG 0 test diff --git a/mappings/net/minecraft/test/TestFunction.mapping b/mappings/net/minecraft/test/TestFunction.mapping index 91ca4c7a38..8d4b5e1582 100644 --- a/mappings/net/minecraft/test/TestFunction.mapping +++ b/mappings/net/minecraft/test/TestFunction.mapping @@ -6,6 +6,9 @@ CLASS net/minecraft/class_4529 net/minecraft/test/TestFunction FIELD field_20587 starter Ljava/util/function/Consumer; FIELD field_20588 tickLimit I FIELD field_21460 duration J + FIELD field_25306 rotation Lnet/minecraft/class_2470; + FIELD field_27814 maxAttempts I + FIELD field_27815 requiredSuccesses I METHOD method_22296 getStructurePath ()Ljava/lang/String; METHOD method_22297 start (Lnet/minecraft/class_4516;)V METHOD method_22298 getStructureName ()Ljava/lang/String; @@ -13,3 +16,7 @@ CLASS net/minecraft/class_4529 net/minecraft/test/TestFunction METHOD method_22300 isRequired ()Z METHOD method_22301 getBatchId ()Ljava/lang/String; METHOD method_23649 getDuration ()J + METHOD method_29424 getRotation ()Lnet/minecraft/class_2470; + METHOD method_32257 isFlaky ()Z + METHOD method_32258 getMaxAttempts ()I + METHOD method_32259 getRequiredSuccesses ()I diff --git a/mappings/net/minecraft/test/TestFunctions.mapping b/mappings/net/minecraft/test/TestFunctions.mapping index 46bef9dc52..4280cf7881 100644 --- a/mappings/net/minecraft/test/TestFunctions.mapping +++ b/mappings/net/minecraft/test/TestFunctions.mapping @@ -2,6 +2,7 @@ CLASS net/minecraft/class_4519 net/minecraft/test/TestFunctions FIELD field_20570 TEST_FUNCTIONS Ljava/util/Collection; FIELD field_20571 testClasses Ljava/util/Set; FIELD field_20572 WORLD_SETTERS Ljava/util/Map; + FIELD field_25302 FAILED_TEST_FUNCTIONS Ljava/util/Collection; METHOD method_22191 getTestFunctions ()Ljava/util/Collection; METHOD method_22192 isInClass (Lnet/minecraft/class_4529;Ljava/lang/String;)Z ARG 0 testFunction @@ -17,3 +18,9 @@ CLASS net/minecraft/class_4519 net/minecraft/test/TestFunctions ARG 0 structurePath METHOD method_22200 getTestFunctionOrThrow (Ljava/lang/String;)Lnet/minecraft/class_4529; ARG 0 structurePath + METHOD method_29404 addFailedTestFunction (Lnet/minecraft/class_4529;)V + ARG 0 testFunction + METHOD method_29405 getFailedTestFunctions ()Ljava/util/Collection; + METHOD method_29406 clearFailedTestFunctions ()V + METHOD method_32244 (Ljava/lang/String;)Ljava/util/function/Consumer; + ARG 0 batchId diff --git a/mappings/net/minecraft/test/TestListener.mapping b/mappings/net/minecraft/test/TestListener.mapping index b240aa0465..a6a4261207 100644 --- a/mappings/net/minecraft/test/TestListener.mapping +++ b/mappings/net/minecraft/test/TestListener.mapping @@ -3,3 +3,5 @@ CLASS net/minecraft/class_4518 net/minecraft/test/TestListener ARG 1 test METHOD method_22190 onFailed (Lnet/minecraft/class_4517;)V ARG 1 test + METHOD method_33317 onPassed (Lnet/minecraft/class_4517;)V + ARG 1 test diff --git a/mappings/net/minecraft/test/TestRunner.mapping b/mappings/net/minecraft/test/TestRunner.mapping index 2a87619727..0eca17eb34 100644 --- a/mappings/net/minecraft/test/TestRunner.mapping +++ b/mappings/net/minecraft/test/TestRunner.mapping @@ -7,7 +7,16 @@ CLASS net/minecraft/class_4515 net/minecraft/test/TestRunner FIELD field_20551 tests Ljava/util/List; FIELD field_20555 reusablePos Lnet/minecraft/class_2338$class_2339; FIELD field_20556 sizeZ I + METHOD (Ljava/util/Collection;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;Lnet/minecraft/class_4521;I)V + ARG 1 batches + ARG 2 pos + ARG 3 rotation + ARG 4 world + ARG 5 testManager + ARG 6 sizeZ METHOD method_22155 getTests ()Ljava/util/List; METHOD method_22156 runBatch (I)V ARG 1 index METHOD method_22160 run ()V + METHOD method_33312 (Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;Lnet/minecraft/class_4514;)Lcom/mojang/datafixers/util/Pair; + ARG 2 batch diff --git a/mappings/net/minecraft/test/TestSet.mapping b/mappings/net/minecraft/test/TestSet.mapping index e83dbae5e4..6dec857ede 100644 --- a/mappings/net/minecraft/test/TestSet.mapping +++ b/mappings/net/minecraft/test/TestSet.mapping @@ -1,5 +1,6 @@ CLASS net/minecraft/class_4524 net/minecraft/test/TestSet FIELD field_20577 tests Ljava/util/Collection; + FIELD field_25303 listeners Ljava/util/Collection; METHOD (Ljava/util/Collection;)V ARG 1 tests METHOD method_22229 getFailedRequiredTestCount ()I @@ -7,6 +8,10 @@ CLASS net/minecraft/class_4524 net/minecraft/test/TestSet ARG 1 test METHOD method_22231 addListener (Lnet/minecraft/class_4518;)V ARG 1 listener + METHOD method_22232 (Lnet/minecraft/class_4518;Lnet/minecraft/class_4517;)V + ARG 1 test + METHOD method_22233 (Ljava/lang/StringBuffer;Lnet/minecraft/class_4517;)V + ARG 1 test METHOD method_22234 getFailedOptionalTestCount ()I METHOD method_22235 getCompletedTestCount ()I METHOD method_22236 failed ()Z @@ -14,3 +19,5 @@ CLASS net/minecraft/class_4524 net/minecraft/test/TestSet METHOD method_22238 getTestCount ()I METHOD method_22239 isDone ()Z METHOD method_22240 getResultString ()Ljava/lang/String; + METHOD method_29407 addListener (Ljava/util/function/Consumer;)V + ARG 1 onFailed diff --git a/mappings/net/minecraft/test/TestUtil.mapping b/mappings/net/minecraft/test/TestUtil.mapping index 71a5f9c5b2..548ef91d71 100644 --- a/mappings/net/minecraft/test/TestUtil.mapping +++ b/mappings/net/minecraft/test/TestUtil.mapping @@ -1,10 +1,16 @@ CLASS net/minecraft/class_4520 net/minecraft/test/TestUtil METHOD method_22203 startTest (Lnet/minecraft/class_4517;Lnet/minecraft/class_2338;Lnet/minecraft/class_4521;)V + ARG 0 test + ARG 1 pos + ARG 2 testManager METHOD method_22209 createBatches (Ljava/util/Collection;)Ljava/util/Collection; ARG 0 testFunctions METHOD method_22210 runTestBatches (Ljava/util/Collection;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;Lnet/minecraft/class_4521;I)Ljava/util/Collection; ARG 0 batches ARG 1 pos + ARG 2 rotation + ARG 3 world + ARG 4 testManager METHOD method_22213 clearDebugMarkers (Lnet/minecraft/class_3218;)V ARG 0 world METHOD method_22216 clearTests (Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_4521;I)V @@ -15,3 +21,6 @@ CLASS net/minecraft/class_4520 net/minecraft/test/TestUtil METHOD method_22222 runTestFunctions (Ljava/util/Collection;Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;Lnet/minecraft/class_4521;I)Ljava/util/Collection; ARG 0 testFunctions ARG 1 pos + ARG 2 rotation + ARG 3 world + ARG 4 testManager