This test should fail instead of writing to std out so that we can add missing OS

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1669745 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2015-03-28 11:40:25 +00:00
parent 098395eaee
commit 2b7e195935
1 changed files with 8 additions and 3 deletions

View File

@ -19,9 +19,13 @@
package org.apache.commons.lang3; package org.apache.commons.lang3;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.apache.commons.lang3.JavaVersion.JAVA_1_4; import static org.apache.commons.lang3.JavaVersion.JAVA_1_4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File; import java.io.File;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@ -29,6 +33,7 @@ import java.lang.reflect.Modifier;
import java.util.Locale; import java.util.Locale;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test;
/** /**
* Unit tests {@link org.apache.commons.lang3.SystemUtils}. * Unit tests {@link org.apache.commons.lang3.SystemUtils}.
@ -208,7 +213,7 @@ public class SystemUtilsTest {
assertTrue(SystemUtils.IS_OS_UNIX); assertTrue(SystemUtils.IS_OS_UNIX);
assertFalse(SystemUtils.IS_OS_WINDOWS); assertFalse(SystemUtils.IS_OS_WINDOWS);
} else { } else {
System.out.println("Can't test IS_OS value: "+osName); fail("Can't test IS_OS value: " + osName);
} }
} }