1 19 20 package org.netbeans.modules.ruby; 21 22 import junit.framework.TestCase; 23 24 28 public class ArityTest extends TestCase { 29 30 public ArityTest(String testName) { 31 super(testName); 32 } 33 34 public void testArityMatches() { 35 assertTrue(Arity.matches(Arity.createTestArity(0, 0), Arity.createTestArity(0,0))); 36 assertTrue(Arity.matches(Arity.createTestArity(1, 1), Arity.createTestArity(1,1))); 37 assertTrue(Arity.matches(Arity.createTestArity(3, 3), Arity.createTestArity(3,5))); 38 assertTrue(Arity.matches(Arity.createTestArity(5, 5), Arity.createTestArity(3,5))); 39 assertTrue(Arity.matches(Arity.createTestArity(4, 4), Arity.createTestArity(3,5))); 40 assertTrue(Arity.matches(Arity.createTestArity(4, 4), Arity.createTestArity(3,5))); 41 assertTrue(Arity.matches(Arity.createTestArity(4, 4), Arity.createTestArity(3,5))); 42 assertTrue(Arity.matches(Arity.createTestArity(4, 4), Arity.createTestArity(0,Integer.MAX_VALUE))); 43 44 assertFalse(Arity.matches(Arity.createTestArity(2, 2), Arity.createTestArity(1,1))); 45 assertFalse(Arity.matches(Arity.createTestArity(2, 2), Arity.createTestArity(0,1))); 46 assertFalse(Arity.matches(Arity.createTestArity(2, 2), Arity.createTestArity(3,4))); 47 48 } 49 } 50 | Popular Tags |