Java Code Examples for joptsimple.internal.Strings#repeat()

The following examples show how to use joptsimple.internal.Strings#repeat() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WildcardMatchLoaderTest.java    From plugins with GNU General Public License v3.0 5 votes vote down vote up
@Test(timeout = 1000)
public void testExplosive()
{
	String name = "archer" + Strings.repeat('e', 50000) + "s ring";
	WildcardMatchLoader loader = new WildcardMatchLoader(Arrays.asList(name + "* < 100"));
	assertTrue(loader.load(new NamedQuantity(name, 50)));
	assertFalse(loader.load(new NamedQuantity(name, 150)));
}
 
Example 2
Source File: ConsoleIO.java    From ForgeHax with MIT License 5 votes vote down vote up
public static void write(String msg, Style style) {
  String tab = Strings.repeat('>', Math.max(getOrCreate().get(), MIN_INDENT)) + " ";
  if (style == null) {
    Helper.printMessageNaked(tab, msg); // TODO: use a non-chat console
  } else {
    Helper.printMessageNaked(tab, msg, style); // TODO: use a non-chat console
  }
}
 
Example 3
Source File: WildcardMatchLoaderTest.java    From runelite with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Test(timeout = 1000)
public void testExplosive()
{
	String name = "archer" + Strings.repeat('e', 50000) + "s ring";
	WildcardMatchLoader loader = new WildcardMatchLoader(Arrays.asList(name + "* < 100"));
	assertTrue(loader.load(new NamedQuantity(name, 50)));
	assertFalse(loader.load(new NamedQuantity(name, 150)));
}
 
Example 4
Source File: ItemThresholdTest.java    From plugins with GNU General Public License v3.0 4 votes vote down vote up
@Test(timeout = 100)
public void testExplosive()
{
	String name = "archer" + Strings.repeat('e', 50000) + "s ring";
	Assert.assertEquals(ItemThreshold.fromConfigEntry(name + " < 387"), new ItemThreshold(name, 387, LESS_THAN));
}
 
Example 5
Source File: ItemThresholdTest.java    From runelite with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Test(timeout = 100)
public void testExplosive()
{
	String name = "archer" + Strings.repeat('e', 50000) + "s ring";
	Assert.assertEquals(ItemThreshold.fromConfigEntry(name + " < 387"), new ItemThreshold(name, 387, LESS_THAN));
}