Skip to content

Commit 97f177d

Browse files
committed
jmh related logic moved to external folder
1 parent d919f5b commit 97f177d

File tree

3 files changed

+35
-80
lines changed

3 files changed

+35
-80
lines changed

jbbp/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,25 @@
6161
</properties>
6262
<build>
6363
<plugins>
64+
<plugin>
65+
<groupId>org.codehaus.mojo</groupId>
66+
<artifactId>build-helper-maven-plugin</artifactId>
67+
<version>3.0.0</version>
68+
<executions>
69+
<execution>
70+
<id>add-jmh-test-source</id>
71+
<phase>generate-test-sources</phase>
72+
<goals>
73+
<goal>add-test-source</goal>
74+
</goals>
75+
<configuration>
76+
<sources>
77+
<source>${basedir}/src/test/jmh</source>
78+
</sources>
79+
</configuration>
80+
</execution>
81+
</executions>
82+
</plugin>
6483
<plugin>
6584
<groupId>com.igormaznitsa</groupId>
6685
<artifactId>jbbp-maven-plugin</artifactId>

jbbp/src/test/java/com/igormaznitsa/jbbp/benchmarks/JBBP_Benchmark.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

jbbp/src/test/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilderTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ public void testEmptyStringForEmptyContent() {
1919
assertEquals("", Begin().End(true));
2020
}
2121

22+
@Test
23+
public void testAllowedVarName() {
24+
Begin().Int("a").End();
25+
Begin().Int("A").End();
26+
Begin().Int("a1").End();
27+
Begin().Int("a2").End();
28+
Begin().Int("a1_1").End();
29+
Begin().Int("a2_2").End();
30+
}
31+
2232
@Test
2333
public void testWrongName() {
2434
assertThrows(IllegalArgumentException.class, new Executable() {
@@ -45,6 +55,12 @@ public void execute() throws Throwable {
4555
Begin().Int("ab\n").End();
4656
}
4757
});
58+
assertThrows(IllegalArgumentException.class, new Executable() {
59+
@Override
60+
public void execute() throws Throwable {
61+
Begin().Int("a$\n").End();
62+
}
63+
});
4864
}
4965

5066
@Test

0 commit comments

Comments
 (0)