diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..c5f3f6b
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "java.configuration.updateBuildConfiguration": "interactive"
+}
\ No newline at end of file
diff --git a/tests/tests/.idea/workspace.xml b/tests/tests/.idea/workspace.xml
index 96f80a8..5c55788 100644
--- a/tests/tests/.idea/workspace.xml
+++ b/tests/tests/.idea/workspace.xml
@@ -4,18 +4,31 @@
-
+
+
+
+
+
+
+
+
+
+
-
+ {
+ "associatedIndex": 2
+}
@@ -23,12 +36,23 @@
+
+
+
+
+
+
+
+
diff --git a/tests/tests/pom.xml b/tests/tests/pom.xml
index a5bd699..b90f397 100644
--- a/tests/tests/pom.xml
+++ b/tests/tests/pom.xml
@@ -13,5 +13,12 @@
21
UTF-8
-
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.8.2
+ test
+
+
\ No newline at end of file
diff --git a/tests/tests/src/main/java/org/example/Main.java b/tests/tests/src/main/java/org/example/Main.java
index 407f157..cfb588e 100644
--- a/tests/tests/src/main/java/org/example/Main.java
+++ b/tests/tests/src/main/java/org/example/Main.java
@@ -1,7 +1,65 @@
package org.example;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+
+
+
public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
+
+
+
+ public static void main(String[] args) throws IOException, InterruptedException, ExecutionException, TimeoutException {
+ // System.out.println("Hello world!");
+// notNotOdd();
+ }
+
+ public int notNotOdd() throws IOException, InterruptedException, ExecutionException, TimeoutException {
+ ExecutorService executor = Executors.newFixedThreadPool(8);
+ ProcessBuilder p = new ProcessBuilder().command(new String[]{"node", "notNotOddNegCase.js"});
+ Process process = p.start();
+ StreamRead stream = new StreamRead(process.getInputStream(),System.out::println);
+ Future> future = executor.submit(stream);
+
+
+ while(!future.isDone()){
+
+ }
+ Object val = future.get(10, TimeUnit.SECONDS);
+ int exit = process.waitFor();
+
+
+ executor.shutdown();
+ return exit;
+ };
+
+ private static class StreamRead implements Runnable {
+ private InputStream inputStream;
+ private Consumer consumer;
+
+ public StreamRead(InputStream inputStream, Consumer consumer){
+ this.inputStream = inputStream;
+ this.consumer = consumer;
+ }
+ @Override
+ public void run(){
+ new BufferedReader(new InputStreamReader(inputStream)).lines().forEach(consumer);
+ }
+
}
+
+
}
\ No newline at end of file
diff --git a/tests/tests/src/main/java/org/example/notNotOddNegCase.js b/tests/tests/src/main/java/org/example/notNotOddNegCase.js
new file mode 100644
index 0000000..36e597d
--- /dev/null
+++ b/tests/tests/src/main/java/org/example/notNotOddNegCase.js
@@ -0,0 +1,9 @@
+import { notNotOdd } from "../../../../../../../index.js";
+//this needs to become a readable stream
+
+const main = (num) => {
+
+ return notNotOdd(num)
+}
+
+console.log(main(1));
\ No newline at end of file
diff --git a/tests/tests/src/main/java/org/example/notNotOddPosCase.js b/tests/tests/src/main/java/org/example/notNotOddPosCase.js
new file mode 100644
index 0000000..33e8b60
--- /dev/null
+++ b/tests/tests/src/main/java/org/example/notNotOddPosCase.js
@@ -0,0 +1,2 @@
+import { notNotOdd } from "../../../../../../../index.js";
+console.log(notNotOdd(1));
\ No newline at end of file
diff --git a/tests/tests/src/test/java/org/example/MainTest.java b/tests/tests/src/test/java/org/example/MainTest.java
new file mode 100644
index 0000000..25ed076
--- /dev/null
+++ b/tests/tests/src/test/java/org/example/MainTest.java
@@ -0,0 +1,23 @@
+package org.example;
+
+import java.io.IOException;
+import java.util.Scanner;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeoutException;
+
+import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.Test;
+
+class MainTest {
+ Main main = new Main();
+
+
+ @Test
+ void shouldBeNotNotOdd() throws IOException, ExecutionException, InterruptedException, TimeoutException {
+ main.notNotOdd();
+ Scanner s = new Scanner(System.in);
+ String val = s.nextLine();
+ assertEquals("true", val);
+ }
+
+}
\ No newline at end of file