29import java.io.IOException;
31import org.jau.util.VersionNumber;
32import org.junit.Assert;
33import org.junit.FixMethodOrder;
35import org.junit.runners.MethodSorters;
37import jau.test.junit.util.JunitTracer;
39@FixMethodOrder(MethodSorters.NAME_ASCENDING)
44 final String vs00 =
"1.0.16";
45 final String vs01 =
"OpenGL ES GLSL ES 1.0.16";
46 final String vs02 =
"1.0.16 OpenGL ES GLSL ES";
50 Assert.assertTrue(vn0.
hasSub());
57 Assert.assertTrue(vn.
hasSub());
58 Assert.assertEquals(vn0, vn);
63 Assert.assertTrue(vn.
hasSub());
64 Assert.assertEquals(vn0, vn);
69 Assert.assertTrue(vn.
hasSub());
70 Assert.assertEquals(vn0, vn);
74 final String delim =
",";
76 final String vs00 =
"1,0,16";
77 final String vs01 =
"OpenGL ES GLSL ES 1,0,16";
78 final String vs02 =
"1,0,16 OpenGL ES GLSL ES";
82 Assert.assertTrue(vn0.
hasSub());
89 Assert.assertTrue(vn.
hasSub());
90 Assert.assertEquals(vn0, vn);
95 Assert.assertTrue(vn.
hasSub());
96 Assert.assertEquals(vn0, vn);
101 Assert.assertTrue(vn.
hasSub());
102 Assert.assertEquals(vn0, vn);
107 final String vs00 =
"4.20";
108 final String vs01 =
"COMPANY via Stupid tool 4.20";
109 final String vs02 =
"4.20 COMPANY via Stupid tool";
113 Assert.assertTrue(vn0.
hasSub());
120 Assert.assertTrue(!vn.
hasSub());
121 Assert.assertEquals(vn0, vn);
126 Assert.assertTrue(!vn.
hasSub());
127 Assert.assertEquals(vn0, vn);
132 Assert.assertTrue(!vn.
hasSub());
133 Assert.assertEquals(vn0, vn);
138 final String delim =
",";
140 final String vs00 =
"4,20";
141 final String vs01 =
"COMPANY via Stupid tool 4,20";
142 final String vs02 =
"4,20 COMPANY via Stupid tool";
146 Assert.assertTrue(vn0.
hasSub());
153 Assert.assertTrue(!vn.
hasSub());
154 Assert.assertEquals(vn0, vn);
159 Assert.assertTrue(!vn.
hasSub());
160 Assert.assertEquals(vn0, vn);
165 Assert.assertTrue(!vn.
hasSub());
166 Assert.assertEquals(vn0, vn);
171 final String vs00 =
"A10.11.12b";
172 final String vs01 =
"Prelim Text 10.Funny11.Weird12 Something is odd";
173 final String vs02 =
"Prelim Text 10.Funny11l1.Weird12 2 Something is odd";
177 Assert.assertTrue(vn0.
hasSub());
184 Assert.assertTrue(vn.
hasSub());
185 Assert.assertEquals(vn0, vn);
190 Assert.assertTrue(vn.
hasSub());
191 Assert.assertEquals(vn0, vn);
196 Assert.assertTrue(vn.
hasSub());
197 Assert.assertEquals(vn0, vn);
202 final String delim =
",";
204 final String vs00 =
"A10,11,12b";
205 final String vs01 =
"Prelim Text 10,Funny11,Weird12 Something is odd";
206 final String vs02 =
"Prelim Text 10,Funny11l1,Weird12 2 Something is odd";
210 Assert.assertTrue(vn0.
hasSub());
217 Assert.assertTrue(vn.
hasSub());
218 Assert.assertEquals(vn0, vn);
223 Assert.assertTrue(vn.
hasSub());
224 Assert.assertEquals(vn0, vn);
229 Assert.assertTrue(vn.
hasSub());
230 Assert.assertEquals(vn0, vn);
235 final String vs00 =
"A10.11.12b (git-d6c318e)";
236 final String vs01 =
"Prelim Text 10.Funny11.Weird12 Something is odd (git-d6c318e)";
237 final String vs02 =
"Prelim Text 10.Funny11l1.Weird12 2 Something is odd (git-d6c318e)";
241 Assert.assertTrue(vn0.
hasSub());
248 Assert.assertTrue(vn.
hasSub());
249 Assert.assertEquals(vn0, vn);
254 Assert.assertTrue(vn.
hasSub());
255 Assert.assertEquals(vn0, vn);
260 Assert.assertTrue(vn.
hasSub());
261 Assert.assertEquals(vn0, vn);
265 final String delim =
",";
267 final String vs00 =
"A10,11,12b (git-d6c318e)";
268 final String vs01 =
"Prelim Text 10,Funny11,Weird12 Something is odd (git-d6c318e)";
269 final String vs02 =
"Prelim Text 10,Funny11l1,Weird12 2 Something is odd (git-d6c318e)";
273 Assert.assertTrue(vn0.
hasSub());
280 Assert.assertTrue(vn.
hasSub());
281 Assert.assertEquals(vn0, vn);
286 Assert.assertTrue(vn.
hasSub());
287 Assert.assertEquals(vn0, vn);
292 Assert.assertTrue(vn.
hasSub());
293 Assert.assertEquals(vn0, vn);
296 public static void main(
final String args[])
throws IOException {
298 org.junit.runner.JUnitCore.
main(tstname);
static void main(final String args[])
Simple version number class containing a version number either being defined explicit or derived from...
final boolean hasSub()
Returns true, if the optional sub component is defined explicitly, otherwise false.
final boolean hasMajor()
Returns true, if the major component is defined explicitly, otherwise false.
final boolean hasMinor()
Returns true, if the optional minor component is defined explicitly, otherwise false.