Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for missingMethod (0.2 sec)

  1. platforms/core-configuration/model-groovy/src/test/groovy/org/gradle/model/dsl/internal/NonTransformedModelDslBackingTest.groovy

                }
            }
            registry.realize("bah", ModelType.UNTYPED)
    
            then:
            e = thrown(ModelRuleExecutionException)
            def missingMethod = e.cause
            assert missingMethod instanceof MissingMethodException
            missingMethod.method == 'unknown'
        }
    
        static class TestObject {
            String prop
    
            def defineSomeThing(Closure cl) {
                cl.delegate = this
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. platforms/software/testing-base/src/testFixtures/groovy/org/gradle/testing/AbstractTestFrameworkIntegrationTest.groovy

            fails(testTaskName, "--tests", "${testSuite('SomeTest')}.missingMethod")
            then:
            failure.assertHasCause("No tests found for given includes: [${testSuite('SomeTest')}.missingMethod](--tests filter)")
    
            //by build script
            when:
            buildFile << "tasks.withType(AbstractTestTask) { filter.includeTestsMatching '${testSuite('SomeTest')}.missingMethod' }"
            fails(testTaskName)
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  3. platforms/jvm/testing-jvm/src/integTest/groovy/org/gradle/testing/AbstractTestFilteringIntegrationTest.groovy

            failsWithTestTaskArguments("test")
            then: failure.assertHasCause("No tests found for given includes: [${pattern}](filter.includeTestsMatching)")
    
            where:
            pattern << ['FooTest.missingMethod', 'org.gradle.FooTest.missingMethod']
        }
    
        def "adds import/export rules to report about no matching methods found"() {
            file("src/test/java/FooTest.java") << """
                ${testFrameworkImports}
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/lookup.go

    // is not set), MissingMethod only checks that methods of T which are also
    // present in V have matching types (e.g., for a type assertion x.(T) where
    // x is of interface type V).
    func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
    	return (*Checker)(nil).missingMethod(V, T, static, Identical, nil)
    }
    
    // missingMethod is like MissingMethod but accepts a *Checker as receiver,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  5. src/go/types/lookup.go

    // is not set), MissingMethod only checks that methods of T which are also
    // present in V have matching types (e.g., for a type assertion x.(T) where
    // x is of interface type V).
    func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
    	return (*Checker)(nil).missingMethod(V, T, static, Identical, nil)
    }
    
    // missingMethod is like MissingMethod but accepts a *Checker as receiver,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  6. src/runtime/error.go

    	RuntimeError()
    }
    
    // A TypeAssertionError explains a failed type assertion.
    type TypeAssertionError struct {
    	_interface    *_type
    	concrete      *_type
    	asserted      *_type
    	missingMethod string // one method needed by Interface, missing from Concrete
    }
    
    func (*TypeAssertionError) RuntimeError() {}
    
    func (e *TypeAssertionError) Error() string {
    	inter := "interface"
    	if e._interface != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. subprojects/core/src/test/groovy/org/gradle/api/internal/AbstractNamedDomainObjectContainerTest.groovy

            MissingPropertyException missingProp = thrown()
            missingProp.property == 'obj1'
    
            when:
            container.obj2 { }
    
            then:
            MissingMethodException missingMethod = thrown()
            missingMethod.method == 'obj2'
    
            when:
            container.configure {
                element {
                    nested
                }
            }
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Dec 27 06:24:30 UTC 2018
    - 11.4K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ifaceassert/ifaceassert.go

    	// Mitigations for interface comparisons and generics.
    	// TODO(https://github.com/golang/go/issues/50658): Support more precise conclusion.
    	if free.Has(V) || free.Has(T) {
    		return nil
    	}
    	if f, wrongType := types.MissingMethod(V, T, false); wrongType {
    		return f
    	}
    	return nil
    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/infer.go

    					//           We leave it as is for now because missingMethod provides
    					//           a failure cause which allows for a better error message.
    					//           Eventually, unify should return an error with cause.
    					var cause string
    					constraint := tpar.iface()
    					if m, _ := check.missingMethod(tx, constraint, true, func(x, y Type) bool { return u.unify(x, y, exact) }, &cause); m != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  10. src/go/types/instantiate.go

    	if Ti.typeSet().IsEmpty() {
    		if cause != nil {
    			*cause = check.sprintf("cannot %s %s (empty type set)", verb, T)
    		}
    		return false
    	}
    
    	// V must implement T's methods, if any.
    	if m, _ := check.missingMethod(V, T, true, Identical, cause); m != nil /* !Implements(V, T) */ {
    		if cause != nil {
    			*cause = check.sprintf("%s does not %s %s %s", V, verb, T, *cause)
    		}
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top