Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for assertHasLineNumber (0.28 sec)

  1. subprojects/core/src/integTest/groovy/org/gradle/api/ProjectConfigureEventsErrorIntegrationTest.groovy

                    .assertHasFileName("Build file '${buildFile}'")
                    .assertHasLineNumber(6)
            failure.assertHasDescription("A problem occurred configuring root project 'projectConfigure'.")
                    .assertHasCause("afterEvaluate failure")
                    .assertHasFileName("Build file '${buildFile}'")
                    .assertHasLineNumber(4)
        }
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-10-05 19:36
    - 6.8K bytes
    - Viewed (0)
  2. subprojects/core/src/integTest/groovy/org/gradle/api/BuildEventsErrorIntegrationTest.groovy

                    .assertHasCause("broken task")
                    .assertHasFileName("Build file '$buildFile'")
                    .assertHasLineNumber(6)
            failure.assertHasDescription("broken closure")
                    .assertHasFileName("Build file '$buildFile'")
                    .assertHasLineNumber(3)
        }
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-04-03 15:21
    - 6K bytes
    - Viewed (0)
  3. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/ConfigurationCacheGroovyClosureIntegrationTest.groovy

                    }
                }
            """
    
            when:
            configurationCacheFails ":some"
    
            then:
            failure.assertHasFileName("Build file '$buildFile'")
            failure.assertHasLineNumber(5)
            failure.assertHasFailure("Execution failed for task ':some'.") {
                it.assertHasCause("Cannot reference a Gradle script object from a Groovy closure as these are not supported with the configuration cache.")
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-06-08 11:29
    - 9.6K bytes
    - Viewed (0)
  4. platforms/extensibility/plugin-use/src/integTest/groovy/org/gradle/plugin/use/PluginUseDslIntegrationSpec.groovy

            when:
            buildScript """
                plugins {}
                buildscript {}
            """
    
            then:
            fails "help"
    
            and:
            failure.assertHasLineNumber 3
            failure.assertHasFileName("Build file '${buildFile}'")
            failure.assertThatCause(containsString("all buildscript {} blocks must appear before any plugins {} blocks"))
            includesLinkToUserguide()
        }
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-11-16 22:36
    - 11.7K bytes
    - Viewed (0)
  5. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/rules/ComponentMetadataRulesErrorHandlingIntegrationTest.groovy

                }
            """
    
            expect:
            fails 'checkDeps'
            resolve.assertFailurePresent(failure)
            failure.assertHasFileName("Build file '$buildFile.path'")
            failure.assertHasLineNumber(lines + 3)
            failure.assertHasCause("There was an error while evaluating a component metadata rule for org.test:projectA:1.0.")
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-10-10 21:10
    - 7.2K bytes
    - Viewed (0)
  6. subprojects/core/src/integTest/groovy/org/gradle/groovy/scripts/StatementLabelsIntegrationTest.groovy

            buildFile << """
    version: '1.0'
            """
    
            expect:
            fails("tasks")
            failure.assertHasFileName("Build file '${buildFile}'")
            failure.assertHasLineNumber(2)
            failure.assertHasDescription("Could not compile build file '${buildFile}'.")
    Registered: 2024-06-12 18:38
    - Last Modified: 2020-05-21 07:18
    - 3.1K bytes
    - Viewed (0)
  7. platforms/extensibility/plugin-use/src/integTest/groovy/org/gradle/plugin/use/PostPluginResolutionFailuresIntegrationSpec.groovy

            expect:
            fails("verify")
            failure.assertThatDescription(startsWith("An exception occurred applying plugin request [id: 'org.my.myplugin', version: '1.0']"))
            failure.assertHasLineNumber(3)
            failure.assertHasCause("Could not create plugin of type 'TestPlugin'.")
        }
    
        def "error creating plugin"() {
            pluginBuilder.addNonConstructiblePlugin(PLUGIN_ID)
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-11-16 22:36
    - 3.3K bytes
    - Viewed (0)
  8. subprojects/core/src/integTest/groovy/org/gradle/api/DynamicObjectIntegrationTest.groovy

            fails()
            failure.assertHasLineNumber(4)
            failure.assertHasCause("Could not set unknown property 'p1' for root project 'test' of type ${Project.name}.")
        }
    
        def failsWhenInvokingUnknownMethodOnProject() {
            buildFile """
                unknown(12, "things")
            """
    
            expect:
            fails()
            failure.assertHasLineNumber(2)
    Registered: 2024-06-12 18:38
    - Last Modified: 2024-05-17 13:27
    - 32.7K bytes
    - Viewed (0)
  9. subprojects/core/src/integTest/groovy/org/gradle/api/ExternalScriptErrorIntegrationTest.groovy

                    .assertHasCause('Could not find method doStuff() for arguments [] on root project')
                    .assertHasFileName("Script '${externalScript}'")
                    .assertHasLineNumber(3)
        }
    
        def "produces reasonable error message when external script fails on compilation"() {
            externalScript << 'import org.gradle()'
    
            when:
            fails()
    
            then:
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-10-05 19:36
    - 2.8K bytes
    - Viewed (0)
  10. subprojects/composite-builds/src/integTest/groovy/org/gradle/integtests/composite/CompositeBuildEventsIntegrationTest.groovy

                .assertHasLineNumber(6)
            failure.assertHasCause("failed in build C")
                .assertHasFileName("Build file '${buildC.buildFile}'")
                .assertHasLineNumber(12)
            failure.assertHasDescription("build C broken")
                .assertHasFileName("Build file '${buildC.buildFile}'")
                .assertHasLineNumber(9)
        }
    
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-12-15 15:38
    - 17.9K bytes
    - Viewed (0)
Back to top