needed = "0.5+ mb"; matcher = new MemoryMatcher( needed ); assertTrue( matcher.matches("512 kb")); assertTrue( matcher.matches("512kb")); assertTrue( matcher.matches("0.5 mb")); assertTrue( matcher.matches("0.5mb")); assertTrue( matcher.matches("1.2 mb")); assertTrue( matcher.matches("1.2mb")); assertFalse( matcher.matches("2048 b")); assertFalse( matcher.matches("2048 bytes")); assertFalse( matcher.matches("2048bytes"));
	public void testMatch() {		String needed = "120+kb";		MemoryMatcher matcher = new MemoryMatcher( needed );		assertTrue( matcher.matches("500 kb"));		assertTrue( matcher.matches("500kb"));		assertTrue( matcher.matches("5 mb"));		assertTrue( matcher.matches("5mb"));		assertTrue( matcher.matches("120 kb"));		assertTrue( matcher.matches("120kb"));		assertFalse( matcher.matches("120 b"));		assertFalse( matcher.matches("120 bytes"));		assertFalse( matcher.matches("120bytes"));		needed = "120+ kb";		matcher = new MemoryMatcher( needed );		assertTrue( matcher.matches("500 kb"));		assertTrue( matcher.matches("500kb"));		assertTrue( matcher.matches("5 mb"));		assertTrue( matcher.matches("5mb"));		assertTrue( matcher.matches("120 kb"));		assertTrue( matcher.matches("120kb"));		assertFalse( matcher.matches("120 b"));		assertFalse( matcher.matches("120 bytes"));		assertFalse( matcher.matches("120bytes"));		needed = "120 + kb";		matcher = new MemoryMatcher( needed );		assertTrue( matcher.matches("500 kb"));		assertTrue( matcher.matches("500kb"));		assertTrue( matcher.matches("5 mb"));		assertTrue( matcher.matches("5mb"));		assertTrue( matcher.matches("120 kb"));		assertTrue( matcher.matches("120kb"));		assertFalse( matcher.matches("120 b"));		assertFalse( matcher.matches("120 bytes"));		assertFalse( matcher.matches("120bytes"));		assertTrue( matcher.matches("5 gb"));		assertTrue( matcher.matches("5gb"));		try {			needed = "120+";			matcher = new MemoryMatcher( needed );			fail("MemoryMatcher should not accept the value [" + needed + "].");		} catch (BuildException e) {			// expected behaviour		}		try {			needed = "120+kk";			matcher = new MemoryMatcher( needed );			fail("MemoryMatcher should not accept the value [" + needed + "].");		} catch (BuildException e) {			// expected behaviour		}	}