changeset 336:3b50d1b2260b

Sample @GMB parameter tests, #2.
author shade
date Sat, 11 Jan 2014 00:38:03 +0400
parents 8f0aa19766e6
children 0ff1459dec27
files jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchForkTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchMethodForkTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/MethodForkTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkGroupThreadsTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkMethodThreadsTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkThreadsTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/MethodThreadsTest.java
diffstat 7 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchForkTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchForkTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -29,7 +29,6 @@
 import org.openjdk.jmh.annotations.Fork;
 import org.openjdk.jmh.annotations.GenerateMicroBenchmark;
 import org.openjdk.jmh.it.parameters.Parameters;
-import org.openjdk.jmh.it.parameters.threads.BenchmarkThreadsTest;
 
 @Fork(10)
 public class BenchForkTest {
@@ -41,7 +40,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getForks().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getForks().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchMethodForkTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/BenchMethodForkTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -29,7 +29,6 @@
 import org.openjdk.jmh.annotations.Fork;
 import org.openjdk.jmh.annotations.GenerateMicroBenchmark;
 import org.openjdk.jmh.it.parameters.Parameters;
-import org.openjdk.jmh.it.parameters.threads.BenchmarkThreadsTest;
 
 @Fork(20)
 public class BenchMethodForkTest {
@@ -42,7 +41,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getForks().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getForks().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/MethodForkTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/fork/MethodForkTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -29,7 +29,6 @@
 import org.openjdk.jmh.annotations.Fork;
 import org.openjdk.jmh.annotations.GenerateMicroBenchmark;
 import org.openjdk.jmh.it.parameters.Parameters;
-import org.openjdk.jmh.it.parameters.threads.BenchmarkThreadsTest;
 
 public class MethodForkTest {
 
@@ -41,7 +40,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getForks().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getForks().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkGroupThreadsTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkGroupThreadsTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -48,7 +48,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getThreads().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getThreads().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkMethodThreadsTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkMethodThreadsTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -41,7 +41,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getThreads().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getThreads().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkThreadsTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/BenchmarkThreadsTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -40,7 +40,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getThreads().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getThreads().get());
     }
 
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/MethodThreadsTest.java	Sat Jan 11 00:15:04 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/threads/MethodThreadsTest.java	Sat Jan 11 00:38:03 2014 +0400
@@ -40,7 +40,7 @@
 
     @Test
     public void test() {
-        Assert.assertEquals(Integer.valueOf(10), Parameters.get(BenchmarkThreadsTest.class).getThreads().get());
+        Assert.assertEquals(Integer.valueOf(10), Parameters.get(this.getClass()).getThreads().get());
     }
 
 }