Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 311 for testMain (0.18 sec)

  1. platforms/jvm/language-java/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/shared/src/main/java/org/gradle/TestMain.java

    package org.gradle;
    
    import java.io.File;
    
    public class TestMain {
        public static void main(String[] args) throws Exception {
            File expectedWorkingDir = new File(args[0]).getCanonicalFile();
            File actualWorkingDir = new File(System.getProperty("user.dir")).getCanonicalFile();
            if (!expectedWorkingDir.getCanonicalFile().equals(actualWorkingDir)) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 22 20:01:36 UTC 2024
    - 716 bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/test_main.txt

    # Test TestMain
    go test standalone_main_normal_test.go
    ! stdout '^ok.*\[no tests to run\]'
    ! stderr '^ok.*\[no tests to run\]'
    stdout '^ok'
    
    # Test TestMain sees testing flags
    go test standalone_testmain_flag_test.go
    stdout '^ok.*\[no tests to run\]'
    
    # Test TestMain with wrong signature (Issue #22388)
    ! go test standalone_main_wrong_test.go
    stderr 'wrong signature for TestMain, must be: func TestMain\(m \*testing.M\)'
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 17 00:45:15 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  3. platforms/jvm/language-java/src/integTest/groovy/org/gradle/integtests/ExecIntegrationTest.groovy

                task javaexecTask(type: JavaExec) {
                    def testFile = file("${'$'}buildDir/${'$'}name")
                    classpath(sourceSets.main.output.classesDirs)
                    mainClass = 'org.gradle.TestMain'
                    args projectDir, testFile
                    doLast {
                        assert testFile.exists()
                    }
                    assert delegate instanceof ExtensionAware
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 22 20:01:36 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/test_exit.txt

    # because this is how TestMain works. If we decide to support -list even when
    # TestMain is used to skip entire packages, we can change this test case.
    go test -list=. ./main_zero
    stdout 'skipping all tests'
    ! stdout TestNotListed
    
    # Running the test directly still fails, if we pass the flag.
    go test -c -o ./zero.exe ./zero
    ! exec ./zero.exe -test.paniconexit0
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 14 20:38:03 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testlife/life_test.go

    package life_test
    
    import (
    	"bytes"
    	"cmd/cgo/internal/cgotest"
    	"internal/testenv"
    	"log"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	log.SetFlags(log.Lshortfile)
    	os.Exit(testMain(m))
    }
    
    func testMain(m *testing.M) int {
    	GOPATH, err := os.MkdirTemp("", "cgolife")
    	if err != nil {
    		log.Panic(err)
    	}
    	defer os.RemoveAll(GOPATH)
    	os.Setenv("GOPATH", GOPATH)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/build_cache_output.txt

    go test -v -x -gcflags=-m -ldflags=-v p
    stderr 'compile( |\.exe"?)'
    stderr 'p_test.go:.*can inline Test' # from compile of p_test
    stderr 'testmain\.go:.*inlin' # from compile of testmain
    stderr 'link(\.exe"?)? -'
    stderr '\d+ symbols' # from linker
    stderr 'p\.test( |\.exe"?)'
    stdout 'TEST' # from test
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/teststdio/stdio_test.go

    import (
    	"bytes"
    	"cmd/cgo/internal/cgotest"
    	"internal/testenv"
    	"log"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	log.SetFlags(log.Lshortfile)
    	os.Exit(testMain(m))
    }
    
    func testMain(m *testing.M) int {
    	GOPATH, err := os.MkdirTemp("", "cgostdio")
    	if err != nil {
    		log.Panic(err)
    	}
    	defer os.RemoveAll(GOPATH)
    	os.Setenv("GOPATH", GOPATH)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  8. src/cmd/go/internal/load/test.go

    		switch {
    		case name == "TestMain":
    			if isTestFunc(n, "T") {
    				t.Tests = append(t.Tests, testFunc{pkg, name, "", false})
    				*doImport, *seen = true, true
    				continue
    			}
    			err := checkTestFunc(n, "M")
    			if err != nil {
    				return err
    			}
    			if t.TestMain != nil {
    				return errors.New("multiple definitions of TestMain")
    			}
    			t.TestMain = &testFunc{pkg, name, "", false}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 14:01:23 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/test_json_exit.txt

    -- go.mod --
    module m
    go 1.14
    -- mainpanic/mainpanic_test.go --
    package mainpanic_test
    
    import "testing"
    
    func TestMain(m *testing.M) {
    	panic("haha no")
    }
    -- mainexit0/mainexit0_test.go --
    package mainexit0_test
    
    import (
    	"fmt"
    	"os"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	fmt.Println("nothing to do")
    	os.Exit(0)
    }
    -- testpanic/testpanic_test.go --
    package testpanic_test
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 19:43:21 UTC 2020
    - 2K bytes
    - Viewed (0)
  10. src/syscall/syscall_freebsd_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build freebsd
    
    package syscall_test
    
    import (
    	"os"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	if os.Getenv("GO_DEATHSIG_PARENT") == "1" {
    		deathSignalParent()
    	} else if os.Getenv("GO_DEATHSIG_CHILD") == "1" {
    		deathSignalChild()
    	}
    
    	os.Exit(m.Run())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 16 01:17:28 UTC 2022
    - 424 bytes
    - Viewed (0)
Back to top