Skip to content

Commit 8d04cc3

Browse files
committed
Added more integration tests.
1 parent 2c5e8f3 commit 8d04cc3

File tree

17 files changed

+508
-41
lines changed

17 files changed

+508
-41
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2017 Colin Fleming
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id 'com.cursive-ide.clojure'
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
}
24+
25+
dependencies {
26+
compile 'org.clojure:clojure:1.8.0'
27+
}
28+
29+
sourceSets {
30+
cljSS {
31+
compileClasspath += configurations.compile
32+
runtimeClasspath += configurations.compile
33+
}
34+
javaSS {
35+
compileClasspath += configurations.compile
36+
runtimeClasspath += configurations.compile
37+
compileClasspath += cljSS.output
38+
runtimeClasspath += cljSS.output
39+
}
40+
}
41+
42+
compileCljSSClojure {
43+
aotCompile = true
44+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
;
2+
; Copyright 2017 Colin Fleming
3+
;
4+
; Licensed under the Apache License, Version 2.0 (the "License")
5+
; you may not use this file except in compliance with the License.
6+
; You may obtain a copy of the License at
7+
;
8+
; http://www.apache.org/licenses/LICENSE-2.0
9+
;
10+
; Unless required by applicable law or agreed to in writing, software
11+
; distributed under the License is distributed on an "AS IS" BASIS,
12+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
; See the License for the specific language governing permissions and
14+
; limitations under the License.
15+
;
16+
17+
(ns cljSS.Example
18+
(:gen-class :methods [[test [] void]]))
19+
20+
(defn -test [this])
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package javaSS;
2+
3+
import cljSS.Example;
4+
5+
public class Test {
6+
public void test() {
7+
new Example().test();
8+
}
9+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2017 Colin Fleming
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id 'com.cursive-ide.clojure'
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
}
24+
25+
dependencies {
26+
compile 'org.clojure:clojure:1.8.0'
27+
}
28+
29+
sourceSets {
30+
javaSS {
31+
compileClasspath += configurations.compile
32+
runtimeClasspath += configurations.compile
33+
}
34+
cljSS {
35+
compileClasspath += configurations.compile
36+
runtimeClasspath += configurations.compile
37+
compileClasspath += javaSS.output
38+
runtimeClasspath += javaSS.output
39+
}
40+
}
41+
42+
compileCljSSClojure {
43+
aotCompile = true
44+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
;
2+
; Copyright 2017 Colin Fleming
3+
;
4+
; Licensed under the Apache License, Version 2.0 (the "License")
5+
; you may not use this file except in compliance with the License.
6+
; You may obtain a copy of the License at
7+
;
8+
; http://www.apache.org/licenses/LICENSE-2.0
9+
;
10+
; Unless required by applicable law or agreed to in writing, software
11+
; distributed under the License is distributed on an "AS IS" BASIS,
12+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
; See the License for the specific language governing permissions and
14+
; limitations under the License.
15+
;
16+
17+
(ns cljSS.core
18+
(:import javaSS.Example))
19+
20+
(defn test []
21+
(.test (Example.)))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2017 Colin Fleming
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package javaSS;
18+
19+
public class Example {
20+
public void test() {
21+
}
22+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2017 Colin Fleming
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id 'com.cursive-ide.clojure'
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
}
24+
25+
dependencies {
26+
compile 'org.clojure:clojure:1.8.0'
27+
}
28+
29+
sourceSets {
30+
ss1 {
31+
}
32+
ss2 {
33+
compileClasspath += configurations.compile
34+
compileClasspath += ss1.output
35+
runtimeClasspath += configurations.compile
36+
runtimeClasspath += ss1.output
37+
}
38+
test {
39+
compileClasspath += configurations.compile
40+
runtimeClasspath += configurations.compile
41+
compileClasspath += ss1.output
42+
runtimeClasspath += ss1.output
43+
compileClasspath += ss2.output
44+
runtimeClasspath += ss2.output
45+
}
46+
}
47+
48+
compileSs2Clojure {
49+
aotCompile = true
50+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
;
2+
; Copyright 2017 Colin Fleming
3+
;
4+
; Licensed under the Apache License, Version 2.0 (the "License")
5+
; you may not use this file except in compliance with the License.
6+
; You may obtain a copy of the License at
7+
;
8+
; http://www.apache.org/licenses/LICENSE-2.0
9+
;
10+
; Unless required by applicable law or agreed to in writing, software
11+
; distributed under the License is distributed on an "AS IS" BASIS,
12+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
; See the License for the specific language governing permissions and
14+
; limitations under the License.
15+
;
16+
17+
(ns ss1.core)
18+
19+
(defn hello []
20+
"SourceSet1")
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
;
2+
; Copyright 2017 Colin Fleming
3+
;
4+
; Licensed under the Apache License, Version 2.0 (the "License")
5+
; you may not use this file except in compliance with the License.
6+
; You may obtain a copy of the License at
7+
;
8+
; http://www.apache.org/licenses/LICENSE-2.0
9+
;
10+
; Unless required by applicable law or agreed to in writing, software
11+
; distributed under the License is distributed on an "AS IS" BASIS,
12+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
; See the License for the specific language governing permissions and
14+
; limitations under the License.
15+
;
16+
17+
(ns ss2.core
18+
(:require [ss1.core]))
19+
20+
(defn hello []
21+
(str "SourceSet2 " (ss1.core/hello)))
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
;
2+
; Copyright 2017 Colin Fleming
3+
;
4+
; Licensed under the Apache License, Version 2.0 (the "License")
5+
; you may not use this file except in compliance with the License.
6+
; You may obtain a copy of the License at
7+
;
8+
; http://www.apache.org/licenses/LICENSE-2.0
9+
;
10+
; Unless required by applicable law or agreed to in writing, software
11+
; distributed under the License is distributed on an "AS IS" BASIS,
12+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
; See the License for the specific language governing permissions and
14+
; limitations under the License.
15+
;
16+
17+
(ns test.core-test
18+
(:require [ss1.core]
19+
[ss2.core]
20+
[clojure.test :refer :all]))
21+
22+
(deftest hello-test
23+
(println "Test1" (ss1.core/hello))
24+
(println "Test2" (ss2.core/hello)))

0 commit comments

Comments
 (0)