Skip to content

Commit

Permalink
Merge pull request junit-team#554 from matthewfarwell/parameterized-j…
Browse files Browse the repository at this point in the history
…avadoc

Fixes junit-team#553, formatted sample code in javadoc
  • Loading branch information
David Saff committed Nov 28, 2012
2 parents 3c1956a + 70e2f2e commit 010f746
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/main/java/org/junit/runners/Parameterized.java
Expand Up @@ -30,24 +30,24 @@
* <pre>
* &#064;RunWith(Parameterized.class)
* public class FibonacciTest {
* &#064;Parameters(name= &quot;{index}: fib({0})={1}&quot;)
* public static Iterable&lt;Object[]&gt; data() {
* return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 },
* &#064;Parameters(name= &quot;{index}: fib[{0}]={1}&quot;)
* public static Iterable&lt;Object[]&gt; data() {
* return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 },
* { 3, 2 }, { 4, 3 }, { 5, 5 }, { 6, 8 } });
* }
*
* private int fInput;
* private int fInput;
*
* private int fExpected;
* private int fExpected;
*
* public FibonacciTest(int input, int expected) {
* fInput= input;
* fExpected= expected;
* public FibonacciTest(int input, int expected) {
* fInput= input;
* fExpected= expected;
* }
*
* &#064;Test
* public void test() {
* assertEquals(fExpected, Fibonacci.compute(fInput));
* &#064;Test
* public void test() {
* assertEquals(fExpected, Fibonacci.compute(fInput));
* }
* }
* </pre>
Expand Down Expand Up @@ -85,7 +85,8 @@
* public static Iterable&lt;Object[]&gt; data() {
* return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 },
* { 3, 2 }, { 4, 3 }, { 5, 5 }, { 6, 8 } });
* }
* }
*
* &#064;Parameter(0)
* public int fInput;
*
Expand All @@ -95,7 +96,7 @@
* &#064;Test
* public void test() {
* assertEquals(fExpected, Fibonacci.compute(fInput));
* }
* }
* }
* </pre>
*
Expand Down

0 comments on commit 010f746

Please sign in to comment.