Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for testFS (0.4 sec)

  1. src/testing/fstest/testfs.go

    // The contents of fsys must not change concurrently with TestFS.
    //
    // If TestFS finds any misbehaviors, it returns either the first error or a
    // list of errors. Use [errors.Is] or [errors.As] to inspect.
    //
    // Typical usage inside a test is:
    //
    //	if err := fstest.TestFS(myFS, "file/that/should/be/present"); err != nil {
    //		t.Fatal(err)
    //	}
    func TestFS(fsys fs.FS, expected ...string) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  2. src/testing/fstest/testfs_test.go

    	if err := os.Symlink(filepath.Join(tmp, "hello"), filepath.Join(tmp, "hello.link")); err != nil {
    		t.Fatal(err)
    	}
    
    	if err := TestFS(tmpfs, "hello", "hello.link"); err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestDash(t *testing.T) {
    	m := MapFS{
    		"a-b/a": {Data: []byte("a-b/a")},
    	}
    	if err := TestFS(m, "a-b/a"); err != nil {
    		t.Error(err)
    	}
    }
    
    type shuffledFS MapFS
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. doc/next/6-stdlib/99-minor/testing/fstest/63675.md

    [TestFS] now returns a structured error that can be unwrapped
    (via method `Unwrap() []error`). This allows inspecting errors
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 20:57:18 UTC 2024
    - 159 bytes
    - Viewed (0)
  4. src/slices/sort_test.go

    	// should propagate the NaN to their output.
    	for i := 0; i < len(fs); i++ {
    		testfs := Clone(fs)
    		testfs[i] = math.NaN()
    
    		fmin := Min(testfs)
    		if !math.IsNaN(fmin) {
    			t.Errorf("got min %v, want NaN", fmin)
    		}
    
    		fmax := Max(testfs)
    		if !math.IsNaN(fmax) {
    			t.Errorf("got max %v, want NaN", fmax)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. src/os/os_test.go

    	from, to := "renameFROM", "RENAMEfrom"
    	tests := []struct {
    		name   string
    		create func() error
    	}{
    		{"dir", func() error {
    			return Mkdir(from, 0777)
    		}},
    		{"file", func() error {
    			fd, err := Create(from)
    			if err != nil {
    				return err
    			}
    			return fd.Close()
    		}},
    	}
    
    	for _, test := range tests {
    		pt.Run(test.name, func(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/width_test.go

    			if test.initialSeatsExpected != workestimateGot.InitialSeats {
    				t.Errorf("Expected work estimate to match: %d initial seats, but got: %d", test.initialSeatsExpected, workestimateGot.InitialSeats)
    			}
    			if test.finalSeatsExpected != workestimateGot.FinalSeats {
    				t.Errorf("Expected work estimate to match: %d final seats, but got: %d", test.finalSeatsExpected, workestimateGot.FinalSeats)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 17K bytes
    - Viewed (0)
  7. pkg/volume/csi/csi_mounter_test.go

    	"k8s.io/kubernetes/pkg/volume/util"
    	volumetypes "k8s.io/kubernetes/pkg/volume/util/types"
    )
    
    var (
    	testDriver  = "test-driver"
    	testVol     = "vol-123"
    	testns      = "test-ns"
    	testPod     = "test-pod"
    	testPodUID  = types.UID("test-pod")
    	testAccount = "test-service-account"
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 50.1K bytes
    - Viewed (0)
  8. maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java

        }
    
        @Test
        void testBadDependencyScope() throws Exception {
            SimpleProblemCollector result = validate("bad-dependency-scope.xml");
    
            assertViolations(result, 0, 0, 2);
    
            assertTrue(result.getWarnings().get(0).contains("test:f"));
    
            assertTrue(result.getWarnings().get(1).contains("test:g"));
        }
    
        @Test
        void testBadDependencyManagementScope() throws Exception {
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Thu May 02 13:13:07 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  9. tensorflow/c/while_loop_test.cc

    //               "output(s)");
    // }
    
    // TODO(skyewm): test bad body output shape
    
    TEST_F(CApiWhileLoopTest, NullName) {
      Init(1);
      CreateCondGraph();
      params_->body_outputs[0] = params_->body_inputs[0];
      params_->name = nullptr;
      ExpectError(TF_INVALID_ARGUMENT, "TF_WhileParams `name` field is null");
    }
    
    TEST_F(CApiWhileLoopTest, WrongGraph) {
      Init(1);
      CreateCondGraph();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 11 06:05:56 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  10. src/cmd/go/internal/test/test.go

    test ./...', and even 'go test .'). In this mode, go test compiles
    and tests each of the packages listed on the command line. If a
    package test passes, go test prints only the final 'ok' summary
    line. If a package test fails, go test prints the full test output.
    If invoked with the -bench or -v flag, go test prints the full
    output even for passing package tests, in order to display the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
Back to top