No need to do a save comparison here

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1557597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2014-01-12 18:59:08 +00:00
parent 10fee7abaf
commit 2abe2c8366
1 changed files with 14 additions and 21 deletions

View File

@ -46,7 +46,6 @@ public class StrTokenizerTest {
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test1() { public void test1() {
@ -62,13 +61,12 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test2() { public void test2() {
@ -84,13 +82,12 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test3() { public void test3() {
@ -106,13 +103,12 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test4() { public void test4() {
@ -128,13 +124,12 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test5() { public void test5() {
@ -151,8 +146,8 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@ -193,7 +188,6 @@ public class StrTokenizerTest {
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test7() { public void test7() {
@ -209,13 +203,12 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }
@SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) has been deprecated in 3.2
@Test @Test
public void test8() { public void test8() {
@ -231,8 +224,8 @@ public class StrTokenizerTest {
assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length); assertEquals(ArrayUtils.toString(tokens), expected.length, tokens.length);
for (int i = 0; i < expected.length; i++) { for (int i = 0; i < expected.length; i++) {
assertTrue("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'", assertEquals("token[" + i + "] was '" + tokens[i] + "' but was expected to be '" + expected[i] + "'",
ObjectUtils.equals(expected[i], tokens[i])); expected[i], tokens[i]);
} }
} }