Fix license, style and svn properties

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@240401 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2005-08-27 10:26:53 +00:00
parent c6068f4733
commit 44e2825d74
1 changed files with 141 additions and 128 deletions

View File

@ -1,5 +1,17 @@
/* /*
* Copyright 2005 Steven Caswell * Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package org.apache.commons.lang; package org.apache.commons.lang;
@ -9,12 +21,12 @@ import junit.framework.TestSuite;
import junit.textui.TestRunner; import junit.textui.TestRunner;
/** /**
* Tests for the IntHashMap class.
* *
* @author Steven Caswell * @author Steven Caswell
* @version $Id$ * @version $Id$
*/ */
public class IntHashMapTest extends TestCase public class IntHashMapTest extends TestCase {
{
public static void main(String[] args) { public static void main(String[] args) {
TestRunner.run(suite()); TestRunner.run(suite());
@ -28,26 +40,27 @@ public class IntHashMapTest extends TestCase
public void testConstructor() { public void testConstructor() {
try { try {
IntHashMap map = new IntHashMap(-1, 0.0f); new IntHashMap(-1, 0.0f);
fail(); fail();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
assertEquals("Illegal Capacity: -1", e.getMessage()); assertEquals("Illegal Capacity: -1", e.getMessage());
} }
try { try {
IntHashMap map = new IntHashMap(1, 0.0f); new IntHashMap(1, 0.0f);
fail(); fail();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
assertEquals("Illegal Load: 0.0", e.getMessage()); assertEquals("Illegal Load: 0.0", e.getMessage());
} }
IntHashMap map = new IntHashMap(0, 1.0f); new IntHashMap(0, 1.0f);
try { try {
IntHashMap map1 = new IntHashMap(-1); new IntHashMap(-1);
fail(); fail();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
assertEquals("Illegal Capacity: -1", e.getMessage()); assertEquals("Illegal Capacity: -1", e.getMessage());
} }
IntHashMap map1 = new IntHashMap(0); IntHashMap map1 = new IntHashMap(0);
assertEquals(0, map1.size());
} }
public void testClear() { public void testClear() {