Skip to content

Commit a5e8991

Browse files
committed
Testing with Gradle and Travis
1 parent c2cfe40 commit a5e8991

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: java
22
jdk: oraclejdk8
3-
script: ./gradlew assemble
3+
script: ./gradlew assemble test
44
sudo: required
55

66
before_script:

build.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,22 @@ repositories {
2222

2323
sourceSets {
2424
main {
25-
java.srcDir 'src'
26-
resources.srcDir 'resources'
25+
java.srcDirs = ['src']
26+
resources.srcDirs = ['resources']
2727
}
28+
test {
29+
java.srcDirs = ['tests']
30+
resources.srcDirs = ['testData']
31+
}
32+
}
33+
34+
task copyResourcesToClasses(type: Copy) {
35+
from "${projectDir}/testData"
36+
into "${buildDir}/classes/test"
2837
}
2938

39+
instrumentTestCode.dependsOn copyResourcesToClasses
40+
3041
dependencies {
3142
compile fileTree(dir: 'lib', include: ['*.jar'])
3243
}

testData/de/halirutan/mathematica/parsing/Slot.txt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FILE(0,313)
2-
PsiComment(COMMENT_START)('(*')(0,2)
3-
PsiComment(COMMENT_CONTENT)(' Slots & SlotSequences ')(2,25)
4-
PsiComment(COMMENT_END)('*)')(25,27)
2+
PsiComment(COMMENT)('(* Slots & SlotSequences *)')(0,27)
53
PsiWhiteSpace('\n')(27,28)
64
CompoundExpression(28,313)
75
Function(28,30)
@@ -28,9 +26,7 @@ FILE(0,313)
2826
PsiElement(FUNCTION)('&')(45,46)
2927
PsiElement(SEMICOLON)(';')(46,47)
3028
PsiWhiteSpace('\n\n')(47,49)
31-
PsiComment(COMMENT_START)('(*')(49,51)
32-
PsiComment(COMMENT_CONTENT)(' Simple Association Slots ')(51,77)
33-
PsiComment(COMMENT_END)('*)')(77,79)
29+
PsiComment(COMMENT)('(* Simple Association Slots *)')(49,79)
3430
PsiWhiteSpace('\n')(79,80)
3531
Function(80,86)
3632
SlotExpression(80,85)
@@ -57,9 +53,7 @@ FILE(0,313)
5753
PsiElement(FUNCTION)('&')(117,118)
5854
PsiElement(SEMICOLON)(';')(118,119)
5955
PsiWhiteSpace('\n\n')(119,121)
60-
PsiComment(COMMENT_START)('(*')(121,123)
61-
PsiComment(COMMENT_CONTENT)(' Function-call like Slot expressions ')(123,160)
62-
PsiComment(COMMENT_END)('*)')(160,162)
56+
PsiComment(COMMENT)('(* Function-call like Slot expressions *)')(121,162)
6357
PsiWhiteSpace('\n')(162,163)
6458
Function(163,173)
6559
SlotExpression(163,172)
@@ -85,9 +79,7 @@ FILE(0,313)
8579
PsiElement(FUNCTION)('&')(182,183)
8680
PsiElement(SEMICOLON)(';')(183,184)
8781
PsiWhiteSpace('\n\n')(184,186)
88-
PsiComment(COMMENT_START)('(*')(186,188)
89-
PsiComment(COMMENT_CONTENT)(' Yo Dawg, I heard you like Slots... ')(188,224)
90-
PsiComment(COMMENT_END)('*)')(224,226)
82+
PsiComment(COMMENT)('(* Yo Dawg, I heard you like Slots... *)')(186,226)
9183
PsiWhiteSpace('\n')(226,227)
9284
Function(227,236)
9385
SlotExpression(227,235)

0 commit comments

Comments
 (0)