Skip to content

Commit 3d80c40

Browse files
committed
7946: core/common.test is not running any tests
Reviewed-by: hirt
1 parent a4ee558 commit 3d80c40

File tree

8 files changed

+60
-56
lines changed

8 files changed

+60
-56
lines changed

core/tests/org.openjdk.jmc.common.test/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
<artifactId>common.test</artifactId>
4242
<properties>
4343
<spotless.config.path>${basedir}/../../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
44-
<fail.if.no.tests>false</fail.if.no.tests>
4544
</properties>
46-
<packaging>jar</packaging>
4745
<dependencies>
4846
<dependency>
4947
<groupId>org.openjdk.jmc</groupId>
@@ -55,4 +53,7 @@
5553
<artifactId>junit</artifactId>
5654
</dependency>
5755
</dependencies>
56+
<build>
57+
<testSourceDirectory>${project.basedir}/src/main/java</testSourceDirectory>
58+
</build>
5859
</project>
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
3-
*
3+
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* The contents of this file are subject to the terms of either the Universal Permissive License
@@ -10,17 +10,17 @@
1010
*
1111
* Redistribution and use in source and binary forms, with or without modification, are permitted
1212
* provided that the following conditions are met:
13-
*
13+
*
1414
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
1515
* and the following disclaimer.
16-
*
16+
*
1717
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
1818
* conditions and the following disclaimer in the documentation and/or other materials provided with
1919
* the distribution.
20-
*
20+
*
2121
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
2222
* endorse or promote products derived from this software without specific prior written permission.
23-
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2525
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2626
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@@ -30,11 +30,7 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.util;
34-
35-
import static org.junit.Assert.assertEquals;
36-
import static org.junit.Assert.assertFalse;
37-
import static org.junit.Assert.fail;
33+
package org.openjdk.jmc.common.test.util;
3834

3935
import java.util.Iterator;
4036
import java.util.NoSuchElementException;
@@ -44,6 +40,10 @@
4440
import org.openjdk.jmc.common.collection.BoundedList;
4541
import org.openjdk.jmc.common.test.SlowTests;
4642

43+
import static org.junit.Assert.assertEquals;
44+
import static org.junit.Assert.assertFalse;
45+
import static org.junit.Assert.fail;
46+
4747
public class BoundedListTest {
4848

4949
private static class ProducerThread implements Runnable {
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3-
*
2+
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
3+
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* The contents of this file are subject to the terms of either the Universal Permissive License
@@ -10,17 +10,17 @@
1010
*
1111
* Redistribution and use in source and binary forms, with or without modification, are permitted
1212
* provided that the following conditions are met:
13-
*
13+
*
1414
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
1515
* and the following disclaimer.
16-
*
16+
*
1717
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
1818
* conditions and the following disclaimer in the documentation and/or other materials provided with
1919
* the distribution.
20-
*
20+
*
2121
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
2222
* endorse or promote products derived from this software without specific prior written permission.
23-
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2525
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2626
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@@ -30,7 +30,7 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.util;
33+
package org.openjdk.jmc.common.test.util;
3434

3535
import java.io.IOException;
3636
import java.io.InputStream;
@@ -100,5 +100,4 @@ public String readFromStream(InputStream stream) throws IOException {
100100
}
101101
return builder.toString();
102102
}
103-
104103
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -30,15 +30,16 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.util;
33+
package org.openjdk.jmc.common.test.util;
34+
35+
import org.junit.Test;
36+
import org.openjdk.jmc.common.util.MethodToolkit;
3437

3538
import static org.junit.Assert.assertEquals;
3639
import static org.junit.Assert.assertFalse;
3740
import static org.junit.Assert.assertNull;
3841
import static org.junit.Assert.assertTrue;
3942

40-
import org.junit.Test;
41-
4243
@SuppressWarnings("nls")
4344
public class MethodToolkitTest {
4445

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
3-
*
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
3+
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* The contents of this file are subject to the terms of either the Universal Permissive License
@@ -10,17 +10,17 @@
1010
*
1111
* Redistribution and use in source and binary forms, with or without modification, are permitted
1212
* provided that the following conditions are met:
13-
*
13+
*
1414
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
1515
* and the following disclaimer.
16-
*
16+
*
1717
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
1818
* conditions and the following disclaimer in the documentation and/or other materials provided with
1919
* the distribution.
20-
*
20+
*
2121
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
2222
* endorse or promote products derived from this software without specific prior written permission.
23-
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2525
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2626
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@@ -30,15 +30,16 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.util;
34-
35-
import static org.junit.Assert.assertEquals;
33+
package org.openjdk.jmc.common.test.util;
3634

3735
import java.util.Arrays;
3836
import java.util.Comparator;
3937
import java.util.Random;
4038

4139
import org.junit.Test;
40+
import org.openjdk.jmc.common.util.SortedHead;
41+
42+
import static org.junit.Assert.assertEquals;
4243

4344
@SuppressWarnings("nls")
4445
public class SortedHeadTest {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -30,11 +30,12 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.util;
34-
35-
import static org.junit.Assert.assertEquals;
33+
package org.openjdk.jmc.common.test.util;
3634

3735
import org.junit.Test;
36+
import org.openjdk.jmc.common.util.TypeHandling;
37+
38+
import static org.junit.Assert.assertEquals;
3839

3940
@SuppressWarnings("nls")
4041
public class TypeHandlingTest {
@@ -49,5 +50,4 @@ public void testGetNumericString() {
4950
assertEquals("N/A (Float.NaN)", TypeHandling.getNumericString(Float.NaN));
5051
assertEquals("N/A (Float.NEGATIVE_INFINITY)", TypeHandling.getNumericString(Float.NEGATIVE_INFINITY));
5152
}
52-
5353
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
3-
*
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
3+
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* The contents of this file are subject to the terms of either the Universal Permissive License
@@ -10,17 +10,17 @@
1010
*
1111
* Redistribution and use in source and binary forms, with or without modification, are permitted
1212
* provided that the following conditions are met:
13-
*
13+
*
1414
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
1515
* and the following disclaimer.
16-
*
16+
*
1717
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
1818
* conditions and the following disclaimer in the documentation and/or other materials provided with
1919
* the distribution.
20-
*
20+
*
2121
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
2222
* endorse or promote products derived from this software without specific prior written permission.
23-
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2525
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2626
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@@ -30,11 +30,12 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.version;
34-
35-
import static org.junit.Assert.assertEquals;
33+
package org.openjdk.jmc.common.test.version;
3634

3735
import org.junit.Test;
36+
import org.openjdk.jmc.common.version.JavaVMVersionToolkit;
37+
38+
import static org.junit.Assert.assertEquals;
3839

3940
public class JavaVMVersionToolkitTest {
4041

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
3-
*
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
3+
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* The contents of this file are subject to the terms of either the Universal Permissive License
@@ -10,17 +10,17 @@
1010
*
1111
* Redistribution and use in source and binary forms, with or without modification, are permitted
1212
* provided that the following conditions are met:
13-
*
13+
*
1414
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
1515
* and the following disclaimer.
16-
*
16+
*
1717
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
1818
* conditions and the following disclaimer in the documentation and/or other materials provided with
1919
* the distribution.
20-
*
20+
*
2121
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
2222
* endorse or promote products derived from this software without specific prior written permission.
23-
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2525
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2626
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@@ -30,14 +30,15 @@
3030
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
3131
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
33-
package org.openjdk.jmc.common.version;
33+
package org.openjdk.jmc.common.test.version;
34+
35+
import org.junit.Test;
36+
import org.openjdk.jmc.common.version.JavaVersion;
3437

3538
import static org.junit.Assert.assertEquals;
3639
import static org.junit.Assert.assertFalse;
3740
import static org.junit.Assert.assertTrue;
3841

39-
import org.junit.Test;
40-
4142
public class JavaVersionTest {
4243

4344
@Test

0 commit comments

Comments
 (0)