Skip to content

Commit 73a17e8

Browse files
committed
[tests] DebugPrinter -> HeadlessTest
1 parent 99f9aca commit 73a17e8

File tree

13 files changed

+93
-72
lines changed

13 files changed

+93
-72
lines changed

spine-c/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "debug-printer (c)",
5+
"name": "headless test (c)",
66
"type": "cppdbg",
77
"request": "launch",
8-
"program": "${workspaceFolder}/build/debug-printer",
8+
"program": "${workspaceFolder}/build/headless-test",
99
"args": [
1010
"${workspaceFolder}/../examples/spineboy/export/spineboy-pro.json",
1111
"${workspaceFolder}/../examples/spineboy/export/spineboy-pma.atlas",

spine-c/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
3939

4040
# Create test executable only if this is the top-level project
4141
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
42-
add_executable(debug-printer ${CMAKE_CURRENT_SOURCE_DIR}/tests/debug-printer.c)
43-
target_link_libraries(debug-printer spine-c)
42+
add_executable(headless-test ${CMAKE_CURRENT_SOURCE_DIR}/tests/headless-test.c)
43+
target_link_libraries(headless-test spine-c)
4444
endif()

spine-cpp/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "debug-printer (cpp)",
5+
"name": "headless test (cpp)",
66
"type": "cppdbg",
77
"request": "launch",
8-
"program": "${workspaceFolder}/build/debug-printer",
8+
"program": "${workspaceFolder}/build/headless-test",
99
"args": [
1010
"${workspaceFolder}/../examples/spineboy/export/spineboy-pro.json",
1111
"${workspaceFolder}/../examples/spineboy/export/spineboy-pma.atlas",

spine-cpp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export(
2222

2323
# Optional tests
2424
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
25-
add_executable(debug-printer ${CMAKE_CURRENT_SOURCE_DIR}/tests/DebugPrinter.cpp)
26-
target_link_libraries(debug-printer spine-cpp)
25+
add_executable(headless-test ${CMAKE_CURRENT_SOURCE_DIR}/tests/HeadlessTest.cpp)
26+
target_link_libraries(headless-test spine-cpp)
2727
endif()

spine-libgdx/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"configurations": [
44
{
55
"type": "java",
6-
"name": "debug-printer (java)",
6+
"name": "headless test (java)",
77
"request": "launch",
8-
"mainClass": "com.esotericsoftware.spine.DebugPrinter",
8+
"mainClass": "com.esotericsoftware.spine.HeadlessTest",
99
"projectName": "spine-libgdx-tests",
1010
"args": [
1111
"${workspaceFolder}/../examples/spineboy/export/spineboy-pro.json",

spine-libgdx/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,10 @@ configure(subprojects - project("spine-libgdx")) {
145145
}
146146

147147
project("spine-libgdx-tests") {
148-
task runDebugPrinter(type: JavaExec) {
149-
main = 'com.esotericsoftware.spine.DebugPrinter'
148+
task runHeadlessTest(type: JavaExec) {
149+
main = 'com.esotericsoftware.spine.HeadlessTest'
150150
classpath = sourceSets.main.runtimeClasspath
151+
workingDir = rootProject.projectDir
151152
if (project.hasProperty('args')) {
152153
args project.getProperty('args').split(' ')
153154
}

spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/DebugPrinter.java renamed to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/HeadlessTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141

4242
import java.util.Locale;
4343

44-
public class DebugPrinter implements ApplicationListener {
44+
public class HeadlessTest implements ApplicationListener {
4545
private String skeletonPath;
4646
private String atlasPath;
4747
private String animationName;
4848

49-
public DebugPrinter (String skeletonPath, String atlasPath, String animationName) {
49+
public HeadlessTest (String skeletonPath, String atlasPath, String animationName) {
5050
this.skeletonPath = skeletonPath;
5151
this.atlasPath = atlasPath;
5252
this.animationName = animationName;
@@ -277,13 +277,13 @@ public void dispose () {
277277

278278
public static void main (String[] args) {
279279
if (args.length < 2) {
280-
System.err.println("Usage: DebugPrinter <skeleton-path> <atlas-path> [animation-name]");
280+
System.err.println("Usage: HeadlessTest <skeleton-path> <atlas-path> [animation-name]");
281281
System.exit(1);
282282
}
283283

284284
HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration();
285285
config.updatesPerSecond = 60;
286286
String animationName = args.length >= 3 ? args[2] : null;
287-
new HeadlessApplication(new DebugPrinter(args[0], args[1], animationName), config);
287+
new HeadlessApplication(new HeadlessTest(args[0], args[1], animationName), config);
288288
}
289289
}

spine-ts/.vscode/launch.json

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "headless test (ts)",
9+
"type": "node",
10+
"request": "launch",
11+
"runtimeExecutable": "npx",
12+
"runtimeArgs": [
13+
"tsx"
14+
],
15+
"program": "${workspaceFolder}/spine-core/tests/HeadlessTest.ts",
16+
"args": [
17+
"${workspaceFolder}/../examples/spineboy/export/spineboy-pro.json",
18+
"${workspaceFolder}/../examples/spineboy/export/spineboy-pma.atlas",
19+
"walk"
20+
],
21+
"cwd": "${workspaceFolder}/spine-core",
22+
"console": "integratedTerminal",
23+
"skipFiles": [
24+
"<node_internals>/**"
25+
]
26+
},
727
{
828
"type": "pwa-chrome",
929
"request": "launch",
@@ -39,26 +59,5 @@
3959
"url": "http://localhost:8080/spine-phaser/example/index.html",
4060
"webRoot": "${workspaceFolder}"
4161
},
42-
{
43-
"name": "debug-printer (ts)",
44-
"type": "node",
45-
"request": "launch",
46-
"runtimeExecutable": "npx",
47-
"runtimeArgs": [
48-
"tsx"
49-
],
50-
"program": "${workspaceFolder}/spine-core/tests/DebugPrinter.ts",
51-
"args": [
52-
"${workspaceFolder}/../examples/spineboy/export/spineboy-pro.json",
53-
"${workspaceFolder}/../examples/spineboy/export/spineboy-pma.atlas",
54-
"walk"
55-
],
56-
"cwd": "${workspaceFolder}/spine-core",
57-
"console": "integratedTerminal",
58-
"skipFiles": [
59-
"<node_internals>/**"
60-
]
61-
}
62-
6362
]
6463
}

0 commit comments

Comments
 (0)