Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for TestIntersect (0.15 sec)

  1. test/typeparam/mapsimp.dir/main.go

    	}
    	mc = a.Copy(m1)
    	a.Sub(mc, map[int]int{1: 0})
    	want := map[int]int{2: 4, 4: 8, 8: 16}
    	if !a.Equal(mc, want) {
    		panic(fmt.Sprintf("a.Sub result = %v, want %v", mc, want))
    	}
    }
    
    func TestIntersect() {
    	mc := a.Copy(m1)
    	a.Intersect(mc, mc)
    	if !a.Equal(mc, m1) {
    		panic(fmt.Sprintf("a.Intersect(%v, %v) = %v, want %v", m1, m1, mc, m1))
    	}
    	a.Intersect(mc, map[int]int{1: 0, 2: 0})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  2. test/typeparam/setsimp.dir/main.go

    		panic(fmt.Sprintf("(%v).Len() == %d, want 1", s1, got))
    	}
    	if vals, want := s1.Values(), []int{1}; !a.SliceEqual(vals, want) {
    		panic(fmt.Sprintf("after SubSet got %v, want %v", vals, want))
    	}
    }
    
    func TestIntersect() {
    	s1 := a.Make[int]()
    	s1.Add(1)
    	s1.Add(2)
    	s2 := a.Make[int]()
    	s2.Add(2)
    	s2.Add(3)
    	s1.Intersect(s2)
    	if got := s1.Len(); got != 1 {
    		panic(fmt.Sprintf("(%v).Len() == %d, want 1", s1, got))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/authenticator/audiences_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package authenticator
    
    import (
    	"reflect"
    	"testing"
    )
    
    func TestIntersect(t *testing.T) {
    	cs := []struct {
    		auds, tauds Audiences
    		expected    Audiences
    	}{
    		{
    			auds:     nil,
    			tauds:    nil,
    			expected: Audiences{},
    		},
    		{
    			auds:     nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 31 21:50:11 UTC 2018
    - 1.7K bytes
    - Viewed (0)
  4. test/typeparam/maps.go

    	}
    	mc = _Copy(m1)
    	_Sub(mc, map[int]int{1: 0})
    	want := map[int]int{2: 4, 4: 8, 8: 16}
    	if !_Equal(mc, want) {
    		panic(fmt.Sprintf("_Sub result = %v, want %v", mc, want))
    	}
    }
    
    func TestIntersect() {
    	mc := _Copy(m1)
    	_Intersect(mc, mc)
    	if !_Equal(mc, m1) {
    		panic(fmt.Sprintf("_Intersect(%v, %v) = %v, want %v", m1, m1, mc, m1))
    	}
    	_Intersect(mc, map[int]int{1: 0, 2: 0})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  5. test/typeparam/sets.go

    		panic(fmt.Sprintf("(%v).Len() == %d, want 1", s1, got))
    	}
    	if vals, want := s1.Values(), []int{1}; !_SliceEqual(vals, want) {
    		panic(fmt.Sprintf("after SubSet got %v, want %v", vals, want))
    	}
    }
    
    func TestIntersect() {
    	s1 := _Make[int]()
    	s1.Add(1)
    	s1.Add(2)
    	s2 := _Make[int]()
    	s2.Add(2)
    	s2.Add(3)
    	s1.Intersect(s2)
    	if got := s1.Len(); got != 1 {
    		panic(fmt.Sprintf("(%v).Len() == %d, want 1", s1, got))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  6. src/cmd/covdata/tool_test.go

    		testTextfmt(t, s)
    	})
    	t.Run("Subtract", func(t *testing.T) {
    		t.Parallel()
    		testSubtract(t, s)
    	})
    	t.Run("Intersect", func(t *testing.T) {
    		t.Parallel()
    		testIntersect(t, s, s.outdirs[0], s.outdirs[1], "set")
    		testIntersect(t, s, s.outdirs[2], s.outdirs[3], "atomic")
    	})
    	t.Run("CounterClash", func(t *testing.T) {
    		t.Parallel()
    		testCounterClash(t, s)
    	})
    	t.Run("TestEmpty", func(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 24.5K bytes
    - Viewed (0)
Back to top