Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for testReplace (0.28 seconds)

  1. 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));
        assertThat(map.replace("bar", 3)).isNull();
        assertEquals(Integer.valueOf(2), map.get("foo"));
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 2.5K bytes
    - Click Count (0)
  2. 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);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 17.5K bytes
    - Click Count (0)
  3. 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 {
    		var (
    			in  = []byte(tt.in)
    			old = []byte(tt.old)
    			new = []byte(tt.new)
    		)
    		if !asan.Enabled {
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Tue Dec 23 23:54:14 GMT 2025
    - 62.9K bytes
    - Click Count (0)
Back to Top