- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for testReplace (0.13 sec)
-
android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
assertFalse(map.remove("bar", 1)); assertEquals(Integer.valueOf(1), map.get("foo")); assertTrue(map.remove("foo", 1)); assertTrue(map.isEmpty()); } public void testReplace() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.replace("foo", 2)); assertNull(map.replace("bar", 3)); assertEquals(Integer.valueOf(2), map.get("foo"));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java
assertEquals(0L, map.get(key)); assertTrue(map.containsKey(key)); assertEquals(0L, map.putIfAbsent(key, value)); assertEquals(value, map.get(key)); } public void testReplace() { AtomicLongMap<String> map = AtomicLongMap.create(); String key = "key"; long newValue = random.nextInt(MAX_ADDEND); for (int i = 0; i < ITERATIONS; i++) { long before = map.get(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 17.4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/lang/StringUtilTest.java
import java.lang.reflect.Method; import org.junit.Test; /** * @author higa * */ public class StringUtilTest { /** * @throws Exception */ @Test public void testReplace() throws Exception { assertEquals("1", "1bc45", StringUtil.replace("12345", "23", "bc")); assertEquals("2", "1234ef", StringUtil.replace("12345", "5", "ef"));
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 12K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"banana", "", "<>", 1, "<>banana"}, {"banana", "a", "a", -1, "banana"}, {"banana", "a", "a", 1, "banana"}, {"☺☻☹", "", "<>", -1, "<>☺<>☻<>☹<>"}, } func TestReplace(t *testing.T) { for _, tt := range ReplaceTests { in := append([]byte(tt.in), "<spare>"...) in = in[:len(tt.in)] out := Replace(in, []byte(tt.old), []byte(tt.new), tt.n) if s := string(out); s != tt.out {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0)