Skip to content

Commit c0b1730

Browse files
committed
WIP: migrate pipeline test class
1 parent 73a3972 commit c0b1730

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*-
2+
* #%L
3+
* Java bindings for itk-wasm.
4+
* %%
5+
* Copyright (C) 2023 ITK developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package org.itk.wasm;
21+
22+
import java.io.IOException;
23+
import java.nio.file.Path;
24+
import java.nio.file.Paths;
25+
import java.util.ArrayList;
26+
27+
import org.junit.jupiter.api.Test;
28+
import org.junit.jupiter.api.condition.EnabledOnOs;
29+
import org.junit.jupiter.api.condition.OS;
30+
31+
public class TestPipeline {
32+
33+
private Path test_input_dir;
34+
private Path test_baseline_dir;
35+
36+
public TestPipeline() {
37+
test_input_dir = Paths.get("").toAbsolutePath().resolve("input");
38+
test_baseline_dir = Paths.get("").toAbsolutePath().resolve("baseline");
39+
}
40+
41+
@Test
42+
public void testStdoutStderr() throws IOException {
43+
// Test logic goes here
44+
Pipeline pipeline = new Pipeline(test_input_dir.resolve("stdout-stderr-test.wasi.wasm").toString());
45+
pipeline.run(new ArrayList<>());
46+
47+
// Test re-run
48+
pipeline.run(new ArrayList<>());
49+
}
50+
51+
@Test
52+
public void test_pipeline_bytes() {
53+
// Test logic goes here
54+
}
55+
56+
@Test
57+
public void test_pipeline_input_output_streams() {
58+
// Test logic goes here
59+
}
60+
61+
@EnabledOnOs(OS.LINUX) // Skip this test on Windows platform
62+
@Test
63+
public void test_pipeline_input_output_files() {
64+
// Test logic goes here
65+
}
66+
67+
@Test
68+
public void test_pipeline_write_read_image() {
69+
// Test logic goes here
70+
}
71+
72+
@Test
73+
public void test_pipeline_write_read_mesh() {
74+
// Test logic goes here
75+
}
76+
77+
@Test
78+
public void test_pipeline_write_read_polydata() {
79+
// Test logic goes here
80+
}
81+
}

0 commit comments

Comments
 (0)