This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Commit bf72c76
committed
[refactoring] made function comparableJavaVersionNumber() more robust // refs #47
the function now creates a 8 digit numeral from whatever form of Java version string or requirement string. See test results below for supported version strings
test results:
########################################################
Testing function JavaVersionSatisfiesRequirement()
Tests with Java 1.6:
[TEST OK] Version number '1.6' has comparable form '06000000' (matches expected result '06000000')
[TEST OK] Version number '1.6+' has comparable form '06000000' (matches expected result '06000000')
[TEST OK] Version number '1.6.0_45' has comparable form '06000045' (matches expected result '06000045')
[TEST OK] Version number '1.6.0_100' has comparable form '06000100' (matches expected result '06000100')
[TEST OK] Version number '1.6.1_87' has comparable form '06001087' (matches expected result '06001087')
Tests with Java 1.7:
[TEST OK] Version number '1.7.0_76' has comparable form '07000076' (matches expected result '07000076')
[TEST OK] Version number '1.7.0_144' has comparable form '07000144' (matches expected result '07000144')
Tests with Java 1.8:
[TEST OK] Version number '1.8' has comparable form '08000000' (matches expected result '08000000')
[TEST OK] Version number '1.8*' has comparable form '08000000' (matches expected result '08000000')
[TEST OK] Version number '1.8.0_98' has comparable form '08000098' (matches expected result '08000098')
[TEST OK] Version number '1.8.0_151' has comparable form '08000151' (matches expected result '08000151')
Tests with Java 9:
[TEST OK] Version number '9' has comparable form '09000000' (matches expected result '09000000')
[TEST OK] Version number '9+' has comparable form '09000000' (matches expected result '09000000')
[TEST OK] Version number '9-ea' has comparable form '09000000' (matches expected result '09000000')
[TEST OK] Version number '9.2' has comparable form '09002000' (matches expected result '09002000')
[TEST OK] Version number '9.2*' has comparable form '09002000' (matches expected result '09002000')
[TEST OK] Version number '9.0.1' has comparable form '09000001' (matches expected result '09000001')
[TEST OK] Version number '9.0.13' has comparable form '09000013' (matches expected result '09000013')
[TEST OK] Version number '9.1.3' has comparable form '09001003' (matches expected result '09001003')
[TEST OK] Version number '9.11' has comparable form '09011000' (matches expected result '09011000')
[TEST OK] Version number '9.10.23' has comparable form '09010023' (matches expected result '09010023')
[TEST OK] Version number '9.10.101' has comparable form '09010101' (matches expected result '09010101')
Tests with Java 10:
[TEST OK] Version number '10' has comparable form '10000000' (matches expected result '10000000')
[TEST OK] Version number '10*' has comparable form '10000000' (matches expected result '10000000')
[TEST OK] Version number '10-ea' has comparable form '10000000' (matches expected result '10000000')
[TEST OK] Version number '10.1' has comparable form '10001000' (matches expected result '10001000')
[TEST OK] Version number '10.1+' has comparable form '10001000' (matches expected result '10001000')
[TEST OK] Version number '10.0.1' has comparable form '10000001' (matches expected result '10000001')
[TEST OK] Version number '10.0.13' has comparable form '10000013' (matches expected result '10000013')
[TEST OK] Version number '10.1.3' has comparable form '10001003' (matches expected result '10001003')
[TEST OK] Version number '10.12' has comparable form '10012000' (matches expected result '10012000')
[TEST OK] Version number '10.10.23' has comparable form '10010023' (matches expected result '10010023')
[TEST OK] Version number '10.10.113' has comparable form '10010113' (matches expected result '10010113')1 parent 65100ec commit bf72c76
2 files changed
Lines changed: 81 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
330 | 335 | | |
331 | 336 | | |
332 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
152 | 222 | | |
153 | 223 | | |
154 | 224 | | |
| |||
0 commit comments