├── LICENSE.md ├── README.md ├── jacoco-maven-plugin.test ├── .project ├── it │ ├── it-check-fails-halt │ │ ├── invoker.properties │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-check-fails-no-halt │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-check-passes │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-customize-agent │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-dump │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── Server.java │ │ └── verify.bsh │ ├── it-includes-excludes │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── org │ │ │ │ │ └── project │ │ │ │ │ ├── DatabaseUtil.java │ │ │ │ │ ├── FileUtil.java │ │ │ │ │ └── TestUtil.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── project │ │ │ │ └── TestDatabaseUtil.java │ │ └── verify.bsh │ ├── it-java9 │ │ ├── invoker.properties │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── Example.java │ │ │ └── test │ │ │ └── java │ │ │ └── ExampleTest.java │ ├── it-merge-passes │ │ ├── it-merge-passes-merge │ │ │ └── pom.xml │ │ ├── it-merge-passes-project1 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ ├── it-merge-passes-project2 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ ├── pom.xml │ │ └── verify.bsh │ ├── it-multi-module │ │ ├── child-jar-without-sources │ │ │ └── pom.xml │ │ ├── child │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ ├── Example.java │ │ │ │ │ └── somepackage │ │ │ │ │ └── Example.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ ├── pom.xml │ │ ├── skip-child │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-multiple-executions │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-offline-instrumentation │ │ ├── child-without-main-classes │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ ├── child │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ ├── DoNotInstrument.java │ │ │ │ │ └── Example.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ ├── pom.xml │ │ └── verify.bsh │ ├── it-prepend-property-skip │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── ExampleTest.java │ ├── it-prepend-property │ │ ├── pom.xml │ │ └── verify.bsh │ ├── it-report-aggregate-customization │ │ ├── child1 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── package1 │ │ │ │ │ └── Example1.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── package1 │ │ │ │ └── Example1Test.java │ │ ├── child2 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── package2 │ │ │ │ │ └── Example2.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── package2 │ │ │ │ └── Example2Test.java │ │ ├── pom.xml │ │ ├── report │ │ │ └── pom.xml │ │ └── verify.bsh │ ├── it-report-aggregate │ │ ├── child1-test │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── package1 │ │ │ │ └── Example1bTest.java │ │ ├── child1 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── package1 │ │ │ │ │ ├── Example1a.java │ │ │ │ │ └── Example1b.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── package1 │ │ │ │ └── Example1aTest.java │ │ ├── child2 │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── package2 │ │ │ │ │ └── Example2.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── package2 │ │ │ │ └── Example2Test.java │ │ ├── pom.xml │ │ ├── report │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── packagereport │ │ │ │ └── ReportTest.java │ │ └── verify.bsh │ ├── it-report-nomatch │ │ ├── nomatch.exec │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── Example.java │ │ └── verify.bsh │ ├── it-report-unreadable-dump │ │ ├── data.txt │ │ ├── invoker.properties │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── resources │ │ │ │ └── empty-file.txt │ │ └── verify.bsh │ ├── it-report-without-debug │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-report-without-dump │ │ ├── pom.xml │ │ └── verify.bsh │ ├── it-site-failsafe │ │ ├── invoker.properties │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ ├── ExampleIT.java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── it-site │ │ ├── invoker.properties │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── Example.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── ExampleTest.java │ │ └── verify.bsh │ ├── settings.xml │ └── setup-parent │ │ └── pom.xml └── pom.xml ├── jacoco-maven-plugin ├── .classpath ├── .project ├── META-INF │ └── m2e │ │ └── lifecycle-mapping-metadata.xml ├── pom.xml └── src │ └── org │ └── jacoco │ └── maven │ ├── AbstractAgentMojo.java │ ├── AbstractJacocoMojo.java │ ├── AbstractReportMojo.java │ ├── AgentITMojo.java │ ├── AgentMojo.java │ ├── CheckMojo.java │ ├── DumpMojo.java │ ├── FileFilter.java │ ├── InstrumentMojo.java │ ├── MergeMojo.java │ ├── ReportAggregateMojo.java │ ├── ReportITMojo.java │ ├── ReportMojo.java │ ├── ReportSupport.java │ ├── RestoreMojo.java │ └── RuleConfiguration.java ├── jacoco ├── .project ├── assembly.xml └── pom.xml ├── jacocoagent.jar ├── org.jacoco.agent.rt.test ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── agent │ └── rt │ └── internal │ ├── AgentTest.java │ ├── ClassFileDumperTest.java │ ├── ConfigLoaderTest.java │ ├── CoverageTransformerTest.java │ ├── ExceptionRecorder.java │ ├── agent-subst-test.properties │ ├── agent-test.properties │ └── output │ ├── ExecutorTestBase.java │ ├── FileOutputTest.java │ ├── MockServerSocket.java │ ├── MockServerSocketTest.java │ ├── MockSocketConnection.java │ ├── MockSocketConnectionTest.java │ ├── TcpClientOutputTest.java │ ├── TcpConnectionTest.java │ └── TcpServerOutputTest.java ├── org.jacoco.agent.rt ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ ├── com │ └── vladium │ │ └── emma │ │ └── rt │ │ ├── RT.java │ │ └── package-info.java │ └── org │ └── jacoco │ └── agent │ └── rt │ ├── IAgent.java │ ├── RT.java │ ├── internal │ ├── Agent.java │ ├── ClassFileDumper.java │ ├── ConfigLoader.java │ ├── CoverageTransformer.java │ ├── IExceptionLogger.java │ ├── JmxRegistration.java │ ├── Offline.java │ ├── PreMain.java │ └── output │ │ ├── FileOutput.java │ │ ├── IAgentOutput.java │ │ ├── NoneOutput.java │ │ ├── TcpClientOutput.java │ │ ├── TcpConnection.java │ │ └── TcpServerOutput.java │ └── package-info.java ├── org.jacoco.agent.test ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── agent │ └── AgentJarTest.java ├── org.jacoco.agent ├── .classpath ├── .project ├── README.TXT ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── agent │ ├── AgentJar.java │ └── package-info.java ├── org.jacoco.ant.test ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ ├── TestTargetInDefault.java │ └── org │ └── jacoco │ └── ant │ ├── AgentTaskTest.java │ ├── AgentTaskTest.xml │ ├── AntFilesLocatorTest.java │ ├── AntResourcesLocatorTest.java │ ├── CoverageTaskTest.java │ ├── CoverageTaskTest.xml │ ├── CreateExecFiles.java │ ├── DumpExecClassNames.java │ ├── DumpTaskTest.java │ ├── DumpTaskTest.xml │ ├── DumpTaskWithServerTest.java │ ├── DumpTaskWithServerTest.xml │ ├── InstrumentTaskTest.java │ ├── InstrumentTaskTest.xml │ ├── MergeTaskTest.java │ ├── MergeTaskTest.xml │ ├── RemoveDebugInfos.java │ ├── ReportTaskLocaleTest.java │ ├── ReportTaskTest.java │ ├── ReportTaskTest.xml │ ├── TestTarget.java │ └── data │ ├── keystore.jks │ ├── nomatch.exec │ ├── sample.bad │ ├── sample1.exec │ └── sample2.exec ├── org.jacoco.ant ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── ant │ ├── AbstractCoverageTask.java │ ├── AgentTask.java │ ├── AntFilesLocator.java │ ├── AntResourcesLocator.java │ ├── CoverageTask.java │ ├── DumpTask.java │ ├── InstrumentTask.java │ ├── MergeTask.java │ ├── ReportTask.java │ └── antlib.xml ├── org.jacoco.build ├── .project ├── pom.xml └── publish.sh ├── org.jacoco.core.test ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── about.html ├── pom.xml ├── src-java8 │ └── org │ │ └── jacoco │ │ └── core │ │ └── test │ │ └── validation │ │ ├── BadCycleInterfaceTest.java │ │ ├── BootstrapMethodReferenceTest.java │ │ ├── InterfaceDefaultMethodsTest.java │ │ ├── InterfaceOnlyDefaultMethodsTest.java │ │ ├── LambdaExpressionsTest.java │ │ ├── LambdaInInterfaceTest.java │ │ └── targets │ │ ├── BadCycleInterface.java │ │ ├── InterfaceDefaultMethodsTarget.java │ │ ├── InterfaceOnlyDefaultMethodsTarget.java │ │ ├── LambdaExpressionsTarget.java │ │ └── LambdaInInterfaceTarget.java └── src │ └── org │ └── jacoco │ └── core │ ├── JaCoCoTest.java │ ├── analysis │ ├── AnalyzerTest.java │ ├── CounterComparatorTest.java │ ├── CoverageBuilderTest.java │ ├── CoverageNodeImplTest.java │ └── NodeComparatorTest.java │ ├── data │ ├── ExecutionDataReaderWriterTest.java │ ├── ExecutionDataStoreTest.java │ ├── ExecutionDataTest.java │ ├── IncompatibleExecDataVersionExceptionTest.java │ ├── SessionInfoStoreTest.java │ └── SessionInfoTest.java │ ├── instr │ ├── InstrumenterTest.java │ └── MethodRecorder.java │ ├── internal │ ├── ContentTypeDetectorTest.java │ ├── Pack200StreamsTest.java │ ├── analysis │ │ ├── BundleCoverageImplTest.java │ │ ├── ClassAnalyzerTest.java │ │ ├── ClassCoverageImplTest.java │ │ ├── CounterImplTest.java │ │ ├── LineImplTest.java │ │ ├── MethodAnalyzerTest.java │ │ ├── MethodCoverageImplTest.java │ │ ├── PackageCoverageTest.java │ │ ├── SourceFileCoverageImplTest.java │ │ ├── SourceNodeImplTest.java │ │ └── StringPoolTest.java │ ├── data │ │ ├── CRC64Test.java │ │ └── CompactDataInputOutputTest.java │ ├── flow │ │ ├── ClassProbesAdapterTest.java │ │ ├── FrameSnapshotTest.java │ │ ├── InstructionTest.java │ │ ├── LabelFlowAnalyzerTest.java │ │ ├── LabelInfoTest.java │ │ ├── MethodProbesAdapterTest.java │ │ └── MethodSanitizerTest.java │ └── instr │ │ ├── ClassInstrumenterTest.java │ │ ├── DuplicateFrameEliminatorTest.java │ │ ├── InstrSupportTest.java │ │ ├── MethodInstrumenterTest.java │ │ ├── ProbeArrayStrategyFactoryTest.java │ │ ├── ProbeCounterTest.java │ │ ├── ProbeInserterTest.java │ │ └── SignatureRemoverTest.java │ ├── runtime │ ├── AgentOptionsTest.java │ ├── CommandLineSupportTest.java │ ├── LoggerRuntimeTest.java │ ├── ModifiedSystemClassRuntimeTest.java │ ├── OfflineInstrumentationAccessGeneratorTest.java │ ├── RemoteControlReaderWriterTest.java │ ├── RuntimeDataTest.java │ ├── RuntimeTestBase.java │ ├── SystemPropertiesRuntimeTest.java │ ├── TestStorage.java │ ├── URLStreamHandlerRuntimeTest.java │ └── WildcardMatcherTest.java │ ├── test │ ├── InstrumentingLoader.java │ ├── TargetLoader.java │ ├── perf │ │ ├── AnalysisTimeScenario.java │ │ ├── ExecuteInstrumentedCodeScenario.java │ │ ├── IPerfOutput.java │ │ ├── IPerfScenario.java │ │ ├── InstrumentationSizeSzenario.java │ │ ├── InstrumentationTimeScenario.java │ │ ├── PerfOutputWriter.java │ │ ├── PerformanceSuite.java │ │ ├── TimedScenario.java │ │ └── targets │ │ │ ├── Target01.java │ │ │ ├── Target02.java │ │ │ └── Target03.java │ └── validation │ │ ├── AnnotationInitializerTest.java │ │ ├── BadCycleClassTest.java │ │ ├── BooleanExpressionsTest.java │ │ ├── ClassFileVersionsTest.java │ │ ├── ClassInitializerTest.java │ │ ├── ControlStructuresTest.java │ │ ├── CyclomaticComplexityTest.java │ │ ├── ExceptionsTest.java │ │ ├── ExplicitInitialFrameTest.java │ │ ├── FieldInitializationInTwoConstructorsTest.java │ │ ├── FramesTest.java │ │ ├── ImplicitDefaultConstructorTest.java │ │ ├── ImplicitFieldInitializationTest.java │ │ ├── InterfaceClassInitializerTest.java │ │ ├── PrivateEmptyDefaultConstructorTest.java │ │ ├── ProbesBeforeSuperConstructorTest.java │ │ ├── ResizeInstructionsTest.java │ │ ├── Source.java │ │ ├── SourceTest.java │ │ ├── StructuredLockingTest.java │ │ ├── ValidationTestBase.java │ │ └── targets │ │ ├── AnnotationInitializer.java │ │ ├── BadCycleClass.java │ │ ├── Stubs.java │ │ ├── Target01.java │ │ ├── Target02.java │ │ ├── Target03.java │ │ ├── Target04.java │ │ ├── Target05.java │ │ ├── Target06.java │ │ ├── Target07.java │ │ ├── Target08.java │ │ ├── Target09.java │ │ ├── Target10.java │ │ ├── Target11.java │ │ └── Target12.java │ └── tools │ ├── ExecDumpClientTest.java │ └── ExecFileLoaderTest.java ├── org.jacoco.core ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── core │ ├── JaCoCo.java │ ├── analysis │ ├── Analyzer.java │ ├── CounterComparator.java │ ├── CoverageBuilder.java │ ├── CoverageNodeImpl.java │ ├── IBundleCoverage.java │ ├── IClassCoverage.java │ ├── ICounter.java │ ├── ICoverageNode.java │ ├── ICoverageVisitor.java │ ├── ILine.java │ ├── IMethodCoverage.java │ ├── IPackageCoverage.java │ ├── ISourceFileCoverage.java │ ├── ISourceNode.java │ ├── NodeComparator.java │ └── package-info.java │ ├── data │ ├── ExecutionData.java │ ├── ExecutionDataReader.java │ ├── ExecutionDataStore.java │ ├── ExecutionDataWriter.java │ ├── IExecutionDataVisitor.java │ ├── ISessionInfoVisitor.java │ ├── IncompatibleExecDataVersionException.java │ ├── SessionInfo.java │ ├── SessionInfoStore.java │ └── package-info.java │ ├── diff │ ├── ASTGeneratror.java │ ├── DiffAST.java │ └── MethodInfo.java │ ├── instr │ ├── Instrumenter.java │ └── package-info.java │ ├── internal │ ├── ContentTypeDetector.java │ ├── Java9Support.java │ ├── Pack200Streams.java │ ├── analysis │ │ ├── BundleCoverageImpl.java │ │ ├── ClassAnalyzer.java │ │ ├── ClassCoverageImpl.java │ │ ├── CounterImpl.java │ │ ├── LineImpl.java │ │ ├── MethodAnalyzer.java │ │ ├── MethodCoverageImpl.java │ │ ├── PackageCoverageImpl.java │ │ ├── SourceFileCoverageImpl.java │ │ ├── SourceNodeImpl.java │ │ └── StringPool.java │ ├── data │ │ ├── CRC64.java │ │ ├── CompactDataInput.java │ │ └── CompactDataOutput.java │ ├── flow │ │ ├── ClassProbesAdapter.java │ │ ├── ClassProbesVisitor.java │ │ ├── FrameSnapshot.java │ │ ├── IFrame.java │ │ ├── IProbeIdGenerator.java │ │ ├── Instruction.java │ │ ├── LabelFlowAnalyzer.java │ │ ├── LabelInfo.java │ │ ├── MethodProbesAdapter.java │ │ ├── MethodProbesVisitor.java │ │ └── MethodSanitizer.java │ └── instr │ │ ├── ClassFieldProbeArrayStrategy.java │ │ ├── ClassInstrumenter.java │ │ ├── DuplicateFrameEliminator.java │ │ ├── IProbeArrayStrategy.java │ │ ├── IProbeInserter.java │ │ ├── InstrSupport.java │ │ ├── InterfaceFieldProbeArrayStrategy.java │ │ ├── LocalProbeArrayStrategy.java │ │ ├── MethodInstrumenter.java │ │ ├── NoneProbeArrayStrategy.java │ │ ├── ProbeArrayStrategyFactory.java │ │ ├── ProbeCounter.java │ │ ├── ProbeInserter.java │ │ └── SignatureRemover.java │ ├── jacoco.properties │ ├── package-info.java │ ├── runtime │ ├── AbstractRuntime.java │ ├── AgentOptions.java │ ├── CommandLineSupport.java │ ├── IExecutionDataAccessorGenerator.java │ ├── IRemoteCommandVisitor.java │ ├── IRuntime.java │ ├── LoggerRuntime.java │ ├── ModifiedSystemClassRuntime.java │ ├── OfflineInstrumentationAccessGenerator.java │ ├── RemoteControlReader.java │ ├── RemoteControlWriter.java │ ├── RuntimeData.java │ ├── SystemPropertiesRuntime.java │ ├── URLStreamHandlerRuntime.java │ ├── WildcardMatcher.java │ └── package-info.java │ └── tools │ ├── ExecDumpClient.java │ ├── ExecFileLoader.java │ └── package-info.java ├── org.jacoco.doc ├── .project ├── .settings │ └── org.eclipse.core.resources.prefs ├── about.html ├── diagrams │ ├── flow.graffle │ └── implementation.graffle ├── docroot │ ├── doc │ │ ├── agent.html │ │ ├── ant.html │ │ ├── api.html │ │ ├── build.html │ │ ├── changes.html │ │ ├── classids.html │ │ ├── conventions.html │ │ ├── counters.html │ │ ├── empty.html │ │ ├── environment.html │ │ ├── epl-v10.html │ │ ├── faq.html │ │ ├── flow.html │ │ ├── implementation.html │ │ ├── index.html │ │ ├── integrations.html │ │ ├── license.html │ │ ├── maven.html │ │ ├── mission.html │ │ ├── offline.html │ │ ├── repo.html │ │ ├── resources │ │ │ ├── doc.css │ │ │ ├── extern.gif │ │ │ ├── flow-cond-probe.png │ │ │ ├── flow-cond.png │ │ │ ├── flow-example.png │ │ │ ├── flow-exit-probe.png │ │ │ ├── flow-exit.png │ │ │ ├── flow-goto-probe.png │ │ │ ├── flow-goto.png │ │ │ ├── flow-sequence-probe.png │ │ │ ├── flow-sequence.png │ │ │ ├── group.gif │ │ │ ├── implementation.png │ │ │ ├── jar.gif │ │ │ ├── report.gif │ │ │ ├── source.gif │ │ │ ├── test.gif │ │ │ └── testsuite.gif │ │ ├── support.html │ │ └── team.html │ └── index.html ├── javadoc │ ├── overview.html │ └── stylesheet.css ├── pom.xml └── xsl │ ├── junit-noframes.xsl │ └── maven-goal.xsl ├── org.jacoco.examples.test ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ ├── org │ └── jacoco │ │ └── examples │ │ ├── ClassInfoTest.java │ │ ├── ConsoleOutput.java │ │ ├── CoreTutorialTest.java │ │ ├── ExecDumpTest.java │ │ └── MBeanClientTest.java │ └── test │ └── resources │ ├── verify-it.groovy │ ├── verify-offline.groovy │ └── verify.groovy ├── org.jacoco.examples ├── .classpath ├── .project ├── about.html ├── assembly.xml ├── build │ ├── build-offline.xml │ ├── build.xml │ ├── pom-it.xml │ ├── pom-offline.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── jacoco │ │ │ └── examples │ │ │ ├── expressions │ │ │ ├── Add.java │ │ │ ├── Const.java │ │ │ ├── Div.java │ │ │ ├── IExpression.java │ │ │ ├── Mul.java │ │ │ └── Sub.java │ │ │ └── parser │ │ │ ├── ExpressionParser.java │ │ │ └── Main.java │ │ └── test │ │ └── java │ │ └── org │ │ └── jacoco │ │ └── examples │ │ └── parser │ │ ├── ExpressionParserIT.java │ │ └── ExpressionParserTest.java ├── pom.xml └── src │ └── org │ └── jacoco │ └── examples │ ├── ClassInfo.java │ ├── CoreTutorial.java │ ├── ExecDump.java │ ├── ExecutionDataClient.java │ ├── ExecutionDataServer.java │ ├── MBeanClient.java │ └── ReportGenerator.java ├── org.jacoco.report.test ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── report │ ├── DirectorySourceFileLocatorTest.java │ ├── FileMultiReportOutputTest.java │ ├── InputStreamSourceFileLocatorTest.java │ ├── JavaNamesTest.java │ ├── MemoryMultiReportOutput.java │ ├── MemoryOutput.java │ ├── MultiReportVisitorTest.java │ ├── MultiSourceFileLocatorTest.java │ ├── ReportStructureTestDriver.java │ ├── ZipMultiReportOutputTest.java │ ├── check │ ├── BundleCheckerTest.java │ ├── LimitTest.java │ ├── RuleTest.java │ └── RulesCheckerTest.java │ ├── csv │ ├── CSVFormatterTest.java │ ├── CSVGroupHandlerTest.java │ ├── ClassRowWriterTest.java │ └── DelimitedWriterTest.java │ ├── html │ └── HTMLFormatterTest.java │ ├── internal │ ├── NormalizedFileNamesTest.java │ ├── ReportOutputFolderTest.java │ ├── html │ │ ├── HTMLDocumentTest.java │ │ ├── HTMLElementTest.java │ │ ├── HTMLSupport.java │ │ ├── LinkableStub.java │ │ ├── page │ │ │ ├── ClassPageTest.java │ │ │ ├── MethodItemTest.java │ │ │ ├── NodePageTest.java │ │ │ ├── PackagePageTest.java │ │ │ ├── PackageSourcePageTest.java │ │ │ ├── PageTestBase.java │ │ │ ├── ReportPageTest.java │ │ │ ├── SessionsPageTest.java │ │ │ ├── SourceFilePageTest.java │ │ │ └── SourceHighlighterTest.java │ │ ├── resources │ │ │ ├── ResourcesTest.java │ │ │ └── StylesTest.java │ │ ├── table │ │ │ ├── BarColumnTest.java │ │ │ ├── CounterColumnTest.java │ │ │ ├── LabelColumnTest.java │ │ │ ├── PercentageColumnTest.java │ │ │ ├── SortIndexTest.java │ │ │ └── TableTest.java │ │ ├── xhtml-lat1.ent │ │ ├── xhtml-special.ent │ │ ├── xhtml-symbol.ent │ │ └── xhtml1-strict.dtd │ └── xml │ │ ├── LocalEntityResolver.java │ │ ├── XMLDocumentTest.java │ │ ├── XMLElementTest.java │ │ ├── XMLGroupVisitorTest.java │ │ └── XMLSupport.java │ └── xml │ └── XMLFormatterTest.java ├── org.jacoco.report ├── .classpath ├── .project ├── about.html ├── pom.xml └── src │ └── org │ └── jacoco │ └── report │ ├── DirectorySourceFileLocator.java │ ├── FileMultiReportOutput.java │ ├── ILanguageNames.java │ ├── IMultiReportOutput.java │ ├── IReportGroupVisitor.java │ ├── IReportVisitor.java │ ├── ISourceFileLocator.java │ ├── InputStreamSourceFileLocator.java │ ├── JavaNames.java │ ├── MultiReportVisitor.java │ ├── MultiSourceFileLocator.java │ ├── ZipMultiReportOutput.java │ ├── check │ ├── BundleChecker.java │ ├── IViolationsOutput.java │ ├── Limit.java │ ├── Rule.java │ ├── RulesChecker.java │ └── package-info.java │ ├── csv │ ├── CSVFormatter.java │ ├── CSVGroupHandler.java │ ├── ClassRowWriter.java │ ├── DelimitedWriter.java │ └── package-info.java │ ├── html │ ├── HTMLFormatter.java │ └── package-info.java │ ├── internal │ ├── AbstractGroupVisitor.java │ ├── NormalizedFileNames.java │ ├── ReportOutputFolder.java │ ├── html │ │ ├── HTMLDocument.java │ │ ├── HTMLElement.java │ │ ├── HTMLGroupVisitor.java │ │ ├── IHTMLReportContext.java │ │ ├── ILinkable.java │ │ ├── index │ │ │ ├── ElementIndex.java │ │ │ ├── IIndexUpdate.java │ │ │ └── package-info.java │ │ ├── page │ │ │ ├── BundlePage.java │ │ │ ├── ClassPage.java │ │ │ ├── GroupPage.java │ │ │ ├── MethodItem.java │ │ │ ├── NodePage.java │ │ │ ├── PackagePage.java │ │ │ ├── PackageSourcePage.java │ │ │ ├── ReportPage.java │ │ │ ├── SessionsPage.java │ │ │ ├── SourceFileItem.java │ │ │ ├── SourceFilePage.java │ │ │ ├── SourceHighlighter.java │ │ │ └── TablePage.java │ │ ├── resources │ │ │ ├── Resources.java │ │ │ ├── Styles.java │ │ │ ├── branchfc.gif │ │ │ ├── branchnc.gif │ │ │ ├── branchpc.gif │ │ │ ├── bundle.gif │ │ │ ├── class.gif │ │ │ ├── down.gif │ │ │ ├── greenbar.gif │ │ │ ├── group.gif │ │ │ ├── method.gif │ │ │ ├── package-info.java │ │ │ ├── package.gif │ │ │ ├── prettify.css │ │ │ ├── prettify.js │ │ │ ├── redbar.gif │ │ │ ├── report.css │ │ │ ├── report.gif │ │ │ ├── session.gif │ │ │ ├── sort.gif │ │ │ ├── sort.js │ │ │ ├── source.gif │ │ │ └── up.gif │ │ └── table │ │ │ ├── BarColumn.java │ │ │ ├── CounterColumn.java │ │ │ ├── IColumnRenderer.java │ │ │ ├── ITableItem.java │ │ │ ├── LabelColumn.java │ │ │ ├── PercentageColumn.java │ │ │ ├── SortIndex.java │ │ │ ├── Table.java │ │ │ ├── TableItemComparator.java │ │ │ └── package-info.java │ └── xml │ │ ├── XMLCoverageWriter.java │ │ ├── XMLDocument.java │ │ ├── XMLElement.java │ │ └── XMLGroupVisitor.java │ ├── package-info.java │ └── xml │ ├── XMLFormatter.java │ ├── package-info.java │ └── report.dtd ├── org.jacoco.tests ├── .project └── pom.xml └── pom.xml /LICENSE.md: -------------------------------------------------------------------------------- 1 | License 2 | ======= 3 | 4 | Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 5 | 6 | The JaCoCo Java Code Coverage Library and all included documentation is made 7 | available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the 8 | Content is provided to you under the terms and conditions of the Eclipse Public 9 | License Version 1.0 ("EPL"). A copy of the EPL is available at 10 | [http://www.eclipse.org/legal/epl-v10.html](http://www.eclipse.org/legal/epl-v10.html). 11 | 12 | Please visit 13 | [http://www.jacoco.org/jacoco/trunk/doc/license.html](http://www.jacoco.org/jacoco/trunk/doc/license.html) 14 | for the complete license information including third party licenses and trademarks. 15 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jacoco-maven-plugin.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | 19 | .settings 20 | 2 21 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.buildResult=failure -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | public class Example { 14 | 15 | public void sayHello() { 16 | System.out.println("Hello world"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import org.junit.Test; 14 | 15 | public class ExampleTest { 16 | 17 | @Test 18 | public void test() { 19 | new Example(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import java.io.*; 14 | import org.codehaus.plexus.util.*; 15 | 16 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 17 | if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) { 18 | throw new RuntimeException( "Coverage checks should not have been met." ); 19 | } 20 | 21 | if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) { 22 | throw new RuntimeException( "Should have displayed insufficient code coverage messages." ); 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | public class Example { 14 | 15 | public void sayHello() { 16 | System.out.println("Hello world"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import org.junit.Test; 14 | 15 | public class ExampleTest { 16 | 17 | @Test 18 | public void test() { 19 | new Example(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import java.io.*; 14 | import org.codehaus.plexus.util.*; 15 | 16 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 17 | if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) { 18 | throw new RuntimeException( "Coverage checks should not have been met." ); 19 | } 20 | 21 | if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) { 22 | throw new RuntimeException( "Should have displayed insufficient code coverage messages." ); 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | public class Example { 14 | 15 | public void sayHello() { 16 | System.out.println("Hello world"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import org.junit.Test; 14 | 15 | public class ExampleTest { 16 | 17 | @Test 18 | public void test() { 19 | new Example().sayHello(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-check-passes/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import java.io.*; 14 | import org.codehaus.plexus.util.*; 15 | 16 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 17 | if ( buildLog.indexOf( "All coverage checks have been met." ) < 0 ) { 18 | throw new RuntimeException( "Coverage checks were not met." ); 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | import java.io.File; 14 | 15 | /** 16 | * Simple server which runs as long a termination file is created. 17 | */ 18 | public class Server { 19 | 20 | public static void main(String[] args) throws Exception { 21 | System.out.println("Test server started"); 22 | 23 | // Wait for termination file to turn up 24 | // This option puts the target in a pseudo 'server' mode 25 | if (args.length == 1) { 26 | final File termFile = new File(args[0]); 27 | 28 | while (!termFile.exists()) { 29 | Thread.sleep(100); 30 | } 31 | } 32 | 33 | System.out.println("Test server stopped"); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-dump/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * Kyle Lieber - implementation of CheckMojo 11 | * 12 | *******************************************************************************/ 13 | import java.io.*; 14 | import org.codehaus.plexus.util.*; 15 | 16 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 17 | if ( buildLog.indexOf( "All coverage checks have been met." ) < 0 ) { 18 | throw new RuntimeException( "Coverage checks were not met." ); 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.project; 13 | 14 | 15 | public class DatabaseUtil { 16 | public void doStuff() { 17 | System.out.println("Do DatabaseUtil Stuff"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.project; 13 | 14 | 15 | public class FileUtil { 16 | public void doStuff() { 17 | System.out.println("Do FileUtil Stuff"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.project; 13 | 14 | 15 | public class TestUtil { 16 | public void doStuff() { 17 | System.out.println("Do TestUtil Stuff"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.project; 13 | 14 | import org.junit.Test; 15 | 16 | public class TestDatabaseUtil { 17 | @Test 18 | public void testDoStuff() { 19 | new DatabaseUtil().doStuff(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-java9/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.java.version = 1.9+ 2 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello(String name) { 15 | // http://openjdk.java.net/jeps/280 16 | System.out.println("Hello, " + name); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello("test"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-merge-passes 19 | 1.0-SNAPSHOT 20 | 21 | 22 | it-merge-passes-project1 23 | 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mads Mohr Christensen - implementation of MergeMojo 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mads Mohr Christensen - implementation of MergeMojo 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-merge-passes 19 | 1.0-SNAPSHOT 20 | 21 | 22 | it-merge-passes-project2 23 | 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mads Mohr Christensen - implementation of MergeMojo 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mads Mohr Christensen - implementation of MergeMojo 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mads Mohr Christensen - implementation of MergeMojo 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 16 | if ( buildLog.indexOf( "Loading execution data file" ) < 0 ) { 17 | throw new RuntimeException( "Could not load execution data file" ); 18 | } 19 | if ( buildLog.indexOf( "Writing merged execution data to" ) < 0 ) { 20 | throw new RuntimeException( "Could not write merged execution data" ); 21 | } -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-multi-module 19 | 1.0-SNAPSHOT 20 | 21 | 22 | 23 | child-jar-without-sources 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-multi-module 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child 23 | 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package somepackage; 13 | 14 | public class Example { 15 | 16 | public void sayHello() { 17 | System.out.println("Hello world"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-multi-module 19 | 1.0-SNAPSHOT 20 | 21 | 22 | skip-child 23 | 24 | 25 | true 26 | 27 | 28 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-offline-instrumentation 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child-without-main-classes 23 | 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-offline-instrumentation 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child 23 | 24 | 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class DoNotInstrument { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | File file = new File( basedir, "child/target/generated-classes/jacoco/Example.class" ); 16 | if ( !file.isFile() ) { 17 | throw new RuntimeException( "Could not find backup of instrumented class: " + file ); 18 | } 19 | file = new File( basedir, "child/target/generated-classes/jacoco/DoNotInstrument.class" ); 20 | if ( file.isFile() ) { 21 | throw new RuntimeException( "Excluded file should not be instrumented: " + file ); 22 | } 23 | 24 | file = new File( basedir, "child/target/coverage.exec" ); 25 | if ( !file.isFile() ) 26 | { 27 | throw new FileNotFoundException( "Could not find generated dump: " + file ); 28 | } 29 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | import static org.junit.Assert.assertNotNull; 15 | 16 | public class ExampleTest { 17 | 18 | @Test 19 | public void test() { 20 | assertNotNull(System.getProperty("foo")); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String agentOptions = "jacoco.exec -ea"; 16 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 17 | if ( buildLog.indexOf( agentOptions ) < 0 ) { 18 | throw new RuntimeException( "Property was not configured" ); 19 | } 20 | 21 | File file = new File( basedir, "target/jacoco.exec" ); 22 | if ( !file.isFile() ) 23 | { 24 | throw new FileNotFoundException( "Could not find generated dump: " + file ); 25 | } 26 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-report-aggregate-customization 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child1 23 | jar 24 | 25 | 26 | target/child1.coverage 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | public class Example1 { 15 | 16 | public void a() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | import org.junit.Test; 15 | 16 | public class Example1Test { 17 | 18 | @Test 19 | public void test() { 20 | new Example1().a(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-report-aggregate-customization 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child2 23 | jar 24 | 25 | 26 | target/child2.coverage 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package2; 13 | 14 | public class Example2 { 15 | 16 | public void a() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package2; 13 | 14 | import org.junit.Test; 15 | 16 | public class Example2Test { 17 | 18 | @Test 19 | public void test() { 20 | new Example2().a(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-report-aggregate 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child1-test 23 | jar 24 | 25 | 26 | 27 | jacoco 28 | child1 29 | ${project.version} 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | import org.junit.Test; 15 | 16 | public class Example1bTest { 17 | 18 | @Test 19 | public void test() { 20 | new Example1b().b(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-report-aggregate 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child1 23 | jar 24 | 25 | 26 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | public class Example1a { 15 | 16 | public void a() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | public class Example1b { 15 | 16 | public void b() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package1; 13 | 14 | import org.junit.Test; 15 | 16 | public class Example1aTest { 17 | 18 | @Test 19 | public void test() { 20 | new Example1a().a(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | 17 | jacoco 18 | it-report-aggregate 19 | 1.0-SNAPSHOT 20 | 21 | 22 | child2 23 | jar 24 | 25 | 26 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package2; 13 | 14 | public class Example2 { 15 | 16 | public void a() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann, Jan Wloka - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package package2; 13 | 14 | import org.junit.Test; 15 | 16 | public class Example2Test { 17 | 18 | @Test 19 | public void test() { 20 | new Example2().a(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package packagereport; 13 | 14 | import org.junit.Test; 15 | 16 | public class ReportTest { 17 | 18 | @Test 19 | public void test() { 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-nomatch/nomatch.exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/jacoco-maven-plugin.test/it/it-report-nomatch/nomatch.exec -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 16 | if ( buildLog.indexOf( "Classes in bundle " ) < 0 || buildLog.indexOf(" do no match with execution data." ) < 0 ) { 17 | throw new RuntimeException( "Warning 1 was not printed" ); 18 | } 19 | if ( buildLog.indexOf( "For report generation the same class files must be used as at runtime." ) < 0 ) { 20 | throw new RuntimeException( "Warning 2 was not printed" ); 21 | } 22 | if ( buildLog.indexOf( "Execution data for class Example does not match." ) < 0 ) { 23 | throw new RuntimeException( "Warning 3 was not printed" ); 24 | } 25 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-unreadable-dump/data.txt: -------------------------------------------------------------------------------- 1 | Invalid data 2 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-unreadable-dump/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.buildResult = failure 2 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/main/resources/empty-file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/main/resources/empty-file.txt -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 16 | if ( buildLog.indexOf( "Invalid execution data file." ) < 0 ) { 17 | throw new RuntimeException( "Error was not printed" ); 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 16 | if ( buildLog.indexOf( "with debug information" ) < 0 ) { 17 | throw new RuntimeException( "No warning about debug information" ); 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import java.io.*; 13 | import org.codehaus.plexus.util.*; 14 | 15 | String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 16 | if ( buildLog.indexOf( "Skipping JaCoCo execution due to missing execution data file" ) < 0 ) { 17 | throw new RuntimeException( "Execution was not skipped" ); 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site-failsafe/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean verify site 2 | 3 | # maven-site-plugin 3.3 works with at least Maven 2.2.1+ 4 | invoker.maven.version = 2.2.1+ 5 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | public void sayHelloIT() { 19 | System.out.println("Hello world"); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleIT { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHelloIT(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean test site 2 | 3 | # maven-site-plugin 3.0 requires at least Maven 2.2.0 4 | invoker.maven.version = 2.2.0+ 5 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | public class Example { 13 | 14 | public void sayHello() { 15 | System.out.println("Hello world"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | import org.junit.Test; 13 | 14 | public class ExampleTest { 15 | 16 | @Test 17 | public void test() { 18 | new Example().sayHello(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jacoco-maven-plugin/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /jacoco-maven-plugin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jacoco-maven-plugin 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | prepare-agent 17 | prepare-agent-integration 18 | merge 19 | report 20 | report-integration 21 | report-aggregate 22 | check 23 | dump 24 | instrument 25 | restore-instrumented-classes 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /jacoco/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jacoco 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /jacocoagent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/jacocoagent.jar -------------------------------------------------------------------------------- /org.jacoco.agent.rt.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.agent.rt.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt.test/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties: -------------------------------------------------------------------------------- 1 | key0=no$replace} 2 | key1=${user.home}/coverage/jacoco-${java.version}.exec 3 | key2=$${user.home} 4 | key3=${user.home}}} 5 | key4=${does.not.exist} -------------------------------------------------------------------------------- /org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties: -------------------------------------------------------------------------------- 1 | output=tcpclient 2 | port=3333 -------------------------------------------------------------------------------- /org.jacoco.agent.rt/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.agent.rt 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Compatibility API for EMMA runtime. 15 | */ 16 | package com.vladium.emma.rt; -------------------------------------------------------------------------------- /org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.agent.rt; 13 | 14 | import org.jacoco.agent.rt.internal.Agent; 15 | 16 | /** 17 | * Entry point to access the JaCoCo agent runtime. 18 | */ 19 | public final class RT { 20 | 21 | private RT() { 22 | } 23 | 24 | /** 25 | * Returns the agent instance of the JaCoCo runtime in this JVM. 26 | * 27 | * @return agent instance 28 | * @throws IllegalStateException 29 | * if no Agent has been started yet 30 | */ 31 | public static IAgent getAgent() throws IllegalStateException { 32 | return Agent.getInstance(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.agent.rt.internal; 13 | 14 | /** 15 | * At several places exception might occur that should be reported. For 16 | * testability these exceptions are emitted against this interface. 17 | */ 18 | public interface IExceptionLogger { 19 | 20 | /** 21 | * Default implementation which dumps the stack trace to System.err. 22 | */ 23 | IExceptionLogger SYSTEM_ERR = new IExceptionLogger() { 24 | public void logExeption(final Exception ex) { 25 | ex.printStackTrace(); 26 | } 27 | }; 28 | 29 | /** 30 | * Logs the given exception. 31 | * 32 | * @param ex 33 | * exception to log 34 | */ 35 | public void logExeption(Exception ex); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mandrikov Evgeny - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.agent.rt.internal.output; 13 | 14 | import org.jacoco.core.runtime.AgentOptions; 15 | import org.jacoco.core.runtime.RuntimeData; 16 | 17 | /** 18 | * Output that does nothing. 19 | */ 20 | public class NoneOutput implements IAgentOutput { 21 | 22 | public final void startup(final AgentOptions options, final RuntimeData data) { 23 | // Nothing to do 24 | } 25 | 26 | public void writeExecutionData(final boolean reset) { 27 | // Nothing to do 28 | } 29 | 30 | public void shutdown() { 31 | // Nothing to do 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * API to access the JaCoCo agent from within the JVM under test. 15 | */ 16 | package org.jacoco.agent.rt; -------------------------------------------------------------------------------- /org.jacoco.agent.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.agent.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.agent.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.agent.test/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.agent/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.agent/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.agent 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | 25 | src/jacocoagent.jar 26 | 1 27 | PARENT-1-PROJECT_LOC/org.jacoco.agent/target/classes/jacocoagent.jar 28 | 29 | 30 | .settings 31 | 2 32 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /org.jacoco.agent/README.TXT: -------------------------------------------------------------------------------- 1 | This bundle provides the coverage agent "jacocoagent.jar" as a resource. The 2 | agent JAR is created as part of the build process and therefore not available in 3 | the source tree. Which means this bundle is incomplete when directly used in the 4 | Eclise IDE. If you want to use the bundle org.jacoco.agent within the IDE, 5 | please run the local build (see documentation) first. 6 | 7 | The jacocoagent.jar file is created by the build at 8 | 9 | /org.jacoco.agent/target/classes/jacocoagent.jar 10 | 11 | and linked by this project. 12 | -------------------------------------------------------------------------------- /org.jacoco.agent/src/org/jacoco/agent/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Provides the runtime Java agent (JAR file) as a resource. 15 | */ 16 | package org.jacoco.agent; -------------------------------------------------------------------------------- /org.jacoco.ant.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.ant.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/TestTargetInDefault.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Test target in default directory. 15 | */ 16 | public class TestTargetInDefault { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import junit.framework.TestSuite; 17 | 18 | import org.apache.ant.antunit.junit3.AntUnitSuite; 19 | import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 20 | import org.junit.runner.RunWith; 21 | 22 | @RunWith(AntUnitSuiteRunner.class) 23 | public class AgentTaskTest { 24 | 25 | public static TestSuite suite() { 26 | final File file = new File("src/org/jacoco/ant/AgentTaskTest.xml"); 27 | return new AntUnitSuite(file, AgentTaskTest.class); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import junit.framework.TestSuite; 17 | 18 | import org.apache.ant.antunit.junit3.AntUnitSuite; 19 | import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 20 | import org.junit.runner.RunWith; 21 | 22 | @RunWith(AntUnitSuiteRunner.class) 23 | public class CoverageTaskTest { 24 | 25 | public static TestSuite suite() { 26 | System.setProperty("org.jacoco.ant.coverageTaskTest.classes.dir", 27 | TestTarget.getClassPath()); 28 | final File file = new File("src/org/jacoco/ant/CoverageTaskTest.xml"); 29 | return new AntUnitSuite(file, CoverageTaskTest.class); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import org.jacoco.core.data.ExecutionData; 17 | import org.jacoco.core.tools.ExecFileLoader; 18 | 19 | /** 20 | * Test utility to dump class names from exec file. 21 | */ 22 | public class DumpExecClassNames { 23 | 24 | public static void main(String[] args) throws Exception { 25 | final ExecFileLoader loader = new ExecFileLoader(); 26 | for (String f : args) { 27 | loader.load(new File(f)); 28 | } 29 | for (ExecutionData d : loader.getExecutionDataStore().getContents()) { 30 | System.out.println(d.getName()); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import junit.framework.TestSuite; 17 | 18 | import org.apache.ant.antunit.junit3.AntUnitSuite; 19 | import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 20 | import org.junit.runner.RunWith; 21 | 22 | @RunWith(AntUnitSuiteRunner.class) 23 | public class DumpTaskTest { 24 | 25 | public static TestSuite suite() { 26 | final File file = new File("src/org/jacoco/ant/DumpTaskTest.xml"); 27 | return new AntUnitSuite(file, DumpTaskTest.class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import junit.framework.TestSuite; 17 | 18 | import org.apache.ant.antunit.junit3.AntUnitSuite; 19 | import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 20 | import org.junit.runner.RunWith; 21 | 22 | @RunWith(AntUnitSuiteRunner.class) 23 | public class DumpTaskWithServerTest { 24 | 25 | public static TestSuite suite() { 26 | System.setProperty("org.jacoco.ant.dumpTaskWithServerTest.classes.dir", 27 | TestTarget.getClassPath()); 28 | final File file = new File( 29 | "src/org/jacoco/ant/DumpTaskWithServerTest.xml"); 30 | return new AntUnitSuite(file, DumpTaskWithServerTest.class); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.ant; 13 | 14 | import java.io.File; 15 | 16 | import junit.framework.TestSuite; 17 | 18 | import org.apache.ant.antunit.junit3.AntUnitSuite; 19 | import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 20 | import org.junit.runner.RunWith; 21 | 22 | @RunWith(AntUnitSuiteRunner.class) 23 | public class MergeTaskTest { 24 | 25 | public static TestSuite suite() { 26 | final File file = new File("src/org/jacoco/ant/MergeTaskTest.xml"); 27 | return new AntUnitSuite(file, MergeTaskTest.class); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/data/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.ant.test/src/org/jacoco/ant/data/keystore.jks -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/data/nomatch.exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.ant.test/src/org/jacoco/ant/data/nomatch.exec -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/data/sample.bad: -------------------------------------------------------------------------------- 1 | No exec file. -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/data/sample1.exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.ant.test/src/org/jacoco/ant/data/sample1.exec -------------------------------------------------------------------------------- /org.jacoco.ant.test/src/org/jacoco/ant/data/sample2.exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.ant.test/src/org/jacoco/ant/data/sample2.exec -------------------------------------------------------------------------------- /org.jacoco.ant/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.ant/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.ant 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.ant/src/org/jacoco/ant/antlib.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.jacoco.build/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.build 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /org.jacoco.build/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ "$1" = "" ]; then 4 | echo "Usage: $0 " 5 | exit 1 6 | fi 7 | 8 | USERNAME=$1 9 | 10 | ssh $USERNAME,eclemma@shell.sourceforge.net create 11 | ssh $USERNAME,eclemma@shell.sourceforge.net '/home/project-web/eclemma/scripts/publish-jacoco-snapshot.sh' 12 | -------------------------------------------------------------------------------- /org.jacoco.core.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.core.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.core.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /org.jacoco.core.test/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/src/test/resources=UTF-8 3 | encoding/=UTF-8 4 | encoding/src=UTF-8 5 | -------------------------------------------------------------------------------- /org.jacoco.core.test/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/InterfaceOnlyDefaultMethodsTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation; 13 | 14 | import org.jacoco.core.analysis.ICounter; 15 | import org.jacoco.core.test.validation.targets.InterfaceOnlyDefaultMethodsTarget; 16 | import org.junit.Test; 17 | 18 | /** 19 | * Tests of default methods in interfaces. 20 | */ 21 | public class InterfaceOnlyDefaultMethodsTest extends ValidationTestBase { 22 | 23 | public InterfaceOnlyDefaultMethodsTest() { 24 | super("src-java8", InterfaceOnlyDefaultMethodsTarget.class); 25 | } 26 | 27 | @Test 28 | public void testCoverageResult() { 29 | assertLine("m1", ICounter.FULLY_COVERED); 30 | assertLine("m2", ICounter.NOT_COVERED); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/LambdaExpressionsTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation; 13 | 14 | import org.jacoco.core.analysis.ICounter; 15 | import org.jacoco.core.test.validation.targets.LambdaExpressionsTarget; 16 | import org.junit.Test; 17 | 18 | /** 19 | * Tests for different lambda expressions. 20 | */ 21 | public class LambdaExpressionsTest extends ValidationTestBase { 22 | 23 | public LambdaExpressionsTest() { 24 | super("src-java8", LambdaExpressionsTarget.class); 25 | } 26 | 27 | @Test 28 | public void testCoverageResult() { 29 | 30 | // Coverage of lambda bodies 31 | assertLine("executedlambdabody", ICounter.FULLY_COVERED); 32 | assertLine("notexecutedlambdabody", ICounter.NOT_COVERED); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/targets/InterfaceOnlyDefaultMethodsTarget.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target is an interface with only default methods. 16 | */ 17 | public interface InterfaceOnlyDefaultMethodsTarget { 18 | 19 | // no , only default methods: 20 | 21 | default void m1() { 22 | return; // $line-m1$ 23 | } 24 | 25 | default void m2() { 26 | return; // $line-m2$ 27 | } 28 | 29 | public class Impl implements InterfaceOnlyDefaultMethodsTarget { 30 | 31 | public Impl() { 32 | m1(); 33 | } 34 | } 35 | 36 | public static void main(String[] args) { 37 | new Impl(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/targets/LambdaExpressionsTarget.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | import static org.jacoco.core.test.validation.targets.Stubs.exec; 15 | import static org.jacoco.core.test.validation.targets.Stubs.noexec; 16 | import static org.jacoco.core.test.validation.targets.Stubs.nop; 17 | 18 | /** 19 | * This test target contains different lambda expressions. 20 | */ 21 | public class LambdaExpressionsTarget { 22 | 23 | public static void main(String[] args) { 24 | 25 | exec(() -> { 26 | nop(); // $line-executedlambdabody$ 27 | }); 28 | 29 | noexec(() -> { 30 | nop(); // $line-notexecutedlambdabody$ 31 | }); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/targets/LambdaInInterfaceTarget.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | import static org.jacoco.core.test.validation.targets.Stubs.nop; 15 | 16 | /** 17 | * This test target builds a constant with a lambda value in an interface. 18 | */ 19 | public interface LambdaInInterfaceTarget { 20 | 21 | public static final Runnable RUN = () -> { 22 | nop(); // $line-lambdabody$ 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core; 13 | 14 | import static org.junit.Assert.assertNotNull; 15 | 16 | import org.junit.Test; 17 | 18 | /** 19 | * Unit tests for {@link JaCoCo}. 20 | */ 21 | public class JaCoCoTest { 22 | 23 | @Test 24 | public void testVERSION() { 25 | assertNotNull(JaCoCo.VERSION); 26 | } 27 | 28 | @Test 29 | public void testHOMEURL() { 30 | assertNotNull(JaCoCo.HOMEURL); 31 | } 32 | 33 | @Test 34 | public void testRUNTIMEPACKAGE() { 35 | assertNotNull(JaCoCo.RUNTIMEPACKAGE); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.internal.analysis; 13 | 14 | import static org.jacoco.core.analysis.ICoverageNode.ElementType.SOURCEFILE; 15 | import static org.junit.Assert.assertEquals; 16 | 17 | import org.junit.Test; 18 | 19 | /** 20 | * Unit test for {@link SourceFileCoverageImpl}. 21 | */ 22 | public class SourceFileCoverageImplTest { 23 | 24 | @Test 25 | public void testProperties() { 26 | SourceFileCoverageImpl data = new SourceFileCoverageImpl("Sample.java", 27 | "org/jacoco/examples"); 28 | assertEquals(SOURCEFILE, data.getElementType()); 29 | assertEquals("org/jacoco/examples", data.getPackageName()); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.runtime; 13 | 14 | /** 15 | * Unit tests for {@link LoggerRuntime}. 16 | */ 17 | public class LoggerRuntimeTest extends RuntimeTestBase { 18 | 19 | @Override 20 | IRuntime createRuntime() { 21 | return new LoggerRuntime(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.runtime; 13 | 14 | /** 15 | * Unit tests for {@link SystemPropertiesRuntime}. 16 | */ 17 | public class SystemPropertiesRuntimeTest extends RuntimeTestBase { 18 | 19 | @Override 20 | IRuntime createRuntime() { 21 | return new SystemPropertiesRuntime(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.runtime; 13 | 14 | import org.junit.Assume; 15 | import org.junit.BeforeClass; 16 | 17 | /** 18 | * Unit tests for {@link URLStreamHandlerRuntime}. 19 | */ 20 | public class URLStreamHandlerRuntimeTest extends RuntimeTestBase { 21 | 22 | @Override 23 | IRuntime createRuntime() { 24 | return new URLStreamHandlerRuntime(); 25 | } 26 | 27 | @BeforeClass 28 | public static void checkJDK() { 29 | final boolean jdk9 = System.getProperty("java.version") 30 | .startsWith("9-"); 31 | Assume.assumeTrue(!jdk9); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.perf; 13 | 14 | /** 15 | * Interface for a performance scenario. 16 | */ 17 | public interface IPerfScenario { 18 | 19 | /** 20 | * Runs the performance scenario and reports the result to the given 21 | * interface. 22 | * 23 | * @param output 24 | */ 25 | public void run(IPerfOutput output) throws Exception; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.perf.targets; 13 | 14 | import java.util.concurrent.Callable; 15 | 16 | /** 17 | * Simple Loop. 18 | */ 19 | public class Target02 implements Callable { 20 | 21 | public Void call() throws Exception { 22 | @SuppressWarnings("unused") 23 | int count = 0; 24 | for (int i = 0; i < 10000000; i++) { 25 | count++; 26 | } 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/ExplicitInitialFrameTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation; 13 | 14 | import org.jacoco.core.analysis.ICounter; 15 | import org.jacoco.core.test.validation.targets.Target11; 16 | import org.junit.Test; 17 | 18 | /** 19 | * Test for a methods having a explicit initial frame. 20 | */ 21 | public class ExplicitInitialFrameTest extends ValidationTestBase { 22 | 23 | public ExplicitInitialFrameTest() { 24 | super(Target11.class); 25 | } 26 | 27 | @Test 28 | public void testCoverageResult() { 29 | 30 | assertLine("dowhilebody", ICounter.FULLY_COVERED); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/ImplicitDefaultConstructorTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation; 13 | 14 | import org.jacoco.core.analysis.ICounter; 15 | import org.jacoco.core.test.validation.targets.Target06; 16 | import org.junit.Test; 17 | 18 | /** 19 | * Test of a implicit default constructor. 20 | * 21 | * @see PrivateEmptyDefaultConstructorTest 22 | */ 23 | public class ImplicitDefaultConstructorTest extends ValidationTestBase { 24 | 25 | public ImplicitDefaultConstructorTest() { 26 | super(Target06.class); 27 | } 28 | 29 | @Test 30 | public void testCoverageResult() { 31 | 32 | assertLine("classdef", ICounter.FULLY_COVERED); 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/ProbesBeforeSuperConstructorTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation; 13 | 14 | import org.jacoco.core.analysis.ICounter; 15 | import org.jacoco.core.test.validation.targets.Target10; 16 | import org.junit.Test; 17 | 18 | /** 19 | * Test of probes before the super constructor call. 20 | */ 21 | public class ProbesBeforeSuperConstructorTest extends ValidationTestBase { 22 | 23 | public ProbesBeforeSuperConstructorTest() { 24 | super(Target10.class); 25 | } 26 | 27 | @Test 28 | public void testCoverageResult() { 29 | 30 | assertLine("super", ICounter.PARTLY_COVERED, 3, 1); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/AnnotationInitializer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target is an annotation with an initializer. 16 | */ 17 | public @interface AnnotationInitializer { 18 | 19 | Object CONST = new Object(); // $line-const$ 20 | 21 | int value() default 0; // $line-value$ 22 | 23 | } 24 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/BadCycleClass.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Evgeny Mandrikov - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | public class BadCycleClass { 15 | 16 | public static class Base { 17 | static final Child b = new Child(); 18 | 19 | static { 20 | b.someMethod(); 21 | } 22 | } 23 | 24 | public static class Child extends Base { 25 | 26 | static { 27 | Stubs.logEvent("childclinit"); // $line-childclinit$ 28 | } 29 | 30 | public Child() { 31 | Stubs.logEvent("childinit"); // $line-childinit$ 32 | } 33 | 34 | void someMethod() { 35 | Stubs.logEvent("childsomeMethod"); // $line-childsomeMethod$ 36 | } 37 | 38 | } 39 | 40 | public static void main(String[] args) { 41 | new Child(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target04.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | import static org.jacoco.core.test.validation.targets.Stubs.i1; 15 | 16 | /** 17 | * This test target is an interface with a class initializer. 18 | */ 19 | public interface Target04 { 20 | 21 | // No code required to initialize these fields: 22 | 23 | static final int CONST1 = 12345; // $line-const1$ 24 | 25 | static final String CONST2 = "const"; // $line-const2$ 26 | 27 | // These fields are initialized within 28 | 29 | static final int CONST3 = i1(); // $line-const3$ 30 | 31 | static final Object CONST4 = new Object(); // $line-const4$ 32 | 33 | } 34 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target06.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target is a class with a implicit default constructor. 16 | * 17 | * @see Target07 explicit constructor 18 | */ 19 | public class Target06 { // $line-classdef$ 20 | 21 | public static void main(String[] args) { 22 | new Target06(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target07.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target is a private empty default constructor. 16 | * 17 | * @see Target06 implicit constructor 18 | */ 19 | public class Target07 { // $line-classdef$ 20 | 21 | private Target07() { // $line-super$ 22 | } // $line-constructor$ 23 | 24 | public static void main(String[] args) { 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target08.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target has instance members with implicit initializers. 16 | */ 17 | public class Target08 { // $line-classdef$ 18 | 19 | Object field1; // $line-field1$ 20 | 21 | Object field2 = this; // $line-field2$ 22 | 23 | int field3; // $line-field3$ 24 | 25 | int field4 = 2000; // $line-field4$ 26 | 27 | public static void main(String[] args) { 28 | new Target08(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target09.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | /** 15 | * This test target has instance members with initialization in two 16 | * constructors. 17 | */ 18 | public class Target09 { 19 | 20 | Object field1 = null; // $line-field1$ 21 | 22 | int field2 = 123; // $line-field2$ 23 | 24 | public Target09() { 25 | } // $line-constr1$ 26 | 27 | public Target09(String arg) { 28 | } // $line-constr2$ 29 | 30 | public static void main(String[] args) { 31 | new Target09(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target10.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | import static org.jacoco.core.test.validation.targets.Stubs.f; 15 | import static org.jacoco.core.test.validation.targets.Stubs.t; 16 | 17 | import org.jacoco.core.test.validation.targets.Stubs.SuperClass; 18 | 19 | /** 20 | * This test target has a constructor containing control structures before the 21 | * superclass constructor is called. 22 | */ 23 | public class Target10 extends SuperClass { 24 | 25 | public Target10() { 26 | super(t() || f()); // $line-super$ 27 | } 28 | 29 | public static void main(String[] args) { 30 | new Target10(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Target11.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.test.validation.targets; 13 | 14 | import static org.jacoco.core.test.validation.targets.Stubs.f; 15 | import static org.jacoco.core.test.validation.targets.Stubs.nop; 16 | 17 | /** 18 | * This test target needs an explicit initial frame as the first instruction 19 | * already is a jump target. 20 | */ 21 | public class Target11 { 22 | 23 | public static void main(String[] args) { 24 | 25 | do { 26 | nop(); // $line-dowhilebody$ 27 | } while (f()); 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.jacoco.core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /org.jacoco.core/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | encoding/src=UTF-8 4 | -------------------------------------------------------------------------------- /org.jacoco.core/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.analysis; 13 | 14 | import java.util.Collection; 15 | 16 | /** 17 | * Coverage data of a bundle. A bundle groups a collection of packages. 18 | * 19 | * @see IPackageCoverage 20 | */ 21 | public interface IBundleCoverage extends ICoverageNode { 22 | 23 | /** 24 | * Returns all packages contained in this bundle. 25 | * 26 | * @return all packages 27 | */ 28 | public Collection getPackages(); 29 | 30 | } -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.analysis; 13 | 14 | /** 15 | * Interface for coverage data output as a stream of {@link IClassCoverage} 16 | * instances. 17 | */ 18 | public interface ICoverageVisitor { 19 | 20 | /** 21 | * For analyzed class coverage data is emitted to this method. 22 | * 23 | * @param coverage 24 | * coverage data for a class 25 | */ 26 | public void visitCoverage(IClassCoverage coverage); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.analysis; 13 | 14 | /** 15 | * Coverage data of a single method. The name of this node is the local method 16 | * name. 17 | */ 18 | public interface IMethodCoverage extends ISourceNode { 19 | 20 | /** 21 | * Returns the descriptor of the method. 22 | * 23 | * @return descriptor 24 | */ 25 | public String getDesc(); 26 | 27 | /** 28 | * Returns the generic signature of the method if defined. 29 | * 30 | * @return generic signature or null 31 | */ 32 | public String getSignature(); 33 | 34 | } -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.analysis; 13 | 14 | /** 15 | * Coverage data of a single source file. The name of this node is the local 16 | * name of the source file. 17 | */ 18 | public interface ISourceFileCoverage extends ISourceNode { 19 | 20 | /** 21 | * Returns the VM name of the package the source file belongs to. 22 | * 23 | * @return package name 24 | */ 25 | public String getPackageName(); 26 | 27 | } -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.data; 13 | 14 | /** 15 | * Interface for data output of collected execution data. This interface is 16 | * meant to be implemented by parties that want to retrieve data from the 17 | * coverage runtime. 18 | */ 19 | public interface IExecutionDataVisitor { 20 | 21 | /** 22 | * Provides execution data for a class. 23 | * 24 | * @param data 25 | * execution data for a class 26 | */ 27 | public void visitClassExecution(ExecutionData data); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.data; 13 | 14 | /** 15 | * Interface for data output of collected session information. This interface is 16 | * meant to be implemented by parties that want to retrieve data from the 17 | * coverage runtime. 18 | */ 19 | public interface ISessionInfoVisitor { 20 | 21 | /** 22 | * Provides session information for the subsequent execution data calls. In 23 | * case of merged sessions this method might be called multiple times. 24 | * 25 | * @param info 26 | * session information 27 | */ 28 | public void visitSessionInfo(final SessionInfo info); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/data/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Representation and persistence of execution data and session information. 15 | */ 16 | package org.jacoco.core.data; -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/instr/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | *

15 | * Instrumentation of Java class files for code coverage. The main entry point 16 | * is the class {@link org.jacoco.core.instr.Instrumenter}. 17 | *

18 | */ 19 | package org.jacoco.core.instr; -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.internal.flow; 13 | 14 | import org.objectweb.asm.MethodVisitor; 15 | 16 | /** 17 | * Representation of the current stackmap frame content. 18 | */ 19 | public interface IFrame { 20 | 21 | /** 22 | * Emits a frame event with the current content to the given visitor. 23 | * 24 | * @param mv 25 | * method visitor to emit frame event to 26 | */ 27 | void accept(final MethodVisitor mv); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.internal.flow; 13 | 14 | /** 15 | * Internal interface to create probe ids unique within a class. 16 | */ 17 | public interface IProbeIdGenerator { 18 | 19 | /** 20 | * Returns the next unique probe id. 21 | * 22 | * @return unique probe id 23 | */ 24 | int nextId(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.internal.instr; 13 | 14 | /** 15 | * Internal interface for insertion of probes into in the instruction sequence 16 | * of a method. 17 | */ 18 | interface IProbeInserter { 19 | 20 | /** 21 | * Inserts the probe with the given id. 22 | * 23 | * @param id 24 | * id of the probe to insert 25 | */ 26 | public void insertProbe(final int id); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.internal.instr; 13 | 14 | import org.objectweb.asm.ClassVisitor; 15 | import org.objectweb.asm.MethodVisitor; 16 | 17 | /** 18 | * The strategy does not emit any code at all. This is used for interface types 19 | * without any code. 20 | */ 21 | class NoneProbeArrayStrategy implements IProbeArrayStrategy { 22 | 23 | public int storeInstance(final MethodVisitor mv, final boolean clinit, 24 | final int variable) { 25 | throw new UnsupportedOperationException(); 26 | } 27 | 28 | public void addMembers(final ClassVisitor delegate, final int probeCount) { 29 | // nothing to do 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/jacoco.properties: -------------------------------------------------------------------------------- 1 | VERSION=$qualified.bundle.version$ 2 | HOMEURL=$jacoco.home.url$ 3 | RUNTIMEPACKAGE=$jacoco.runtime.package.name$ -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Meta information about JaCoCo. 15 | */ 16 | package org.jacoco.core; -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.core.runtime; 13 | 14 | import java.io.IOException; 15 | 16 | /** 17 | * Interface for remote commands to a coverage runtime. 18 | */ 19 | public interface IRemoteCommandVisitor { 20 | 21 | /** 22 | * Requests a execution data dump with an optional reset. 23 | * 24 | * @param dump 25 | * true if the dump should be executed 26 | * @param reset 27 | * true if the reset should be executed 28 | * @throws IOException 29 | * in case of problems with the remote connection 30 | */ 31 | public void visitDumpCommand(final boolean dump, final boolean reset) 32 | throws IOException; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/runtime/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Runtime control and execution data collection. 15 | */ 16 | package org.jacoco.core.runtime; -------------------------------------------------------------------------------- /org.jacoco.core/src/org/jacoco/core/tools/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Collection of tools build on top of the JaCoCo core APIs. The tools offer 15 | * more high-level functionality useful for integrating JaCoCo. 16 | */ 17 | package org.jacoco.core.tools; -------------------------------------------------------------------------------- /org.jacoco.doc/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.doc 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.jacoco.doc/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.jacoco.doc/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/empty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | JaCoCo - XXX TITLE XXX 9 | 10 | 11 | 12 | 16 |
17 | 18 |

Title

19 | 20 |

21 | Text 22 |

23 | 24 |
25 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/extern.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/extern.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-cond-probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-cond-probe.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-cond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-cond.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-example.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-exit-probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-exit-probe.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-exit.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-goto-probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-goto-probe.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-goto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-goto.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-sequence-probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-sequence-probe.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/flow-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/flow-sequence.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/group.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/group.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/implementation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/implementation.png -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/jar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/jar.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/report.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/report.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/source.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/source.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/test.gif -------------------------------------------------------------------------------- /org.jacoco.doc/docroot/doc/resources/testsuite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.doc/docroot/doc/resources/testsuite.gif -------------------------------------------------------------------------------- /org.jacoco.doc/javadoc/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

5 | This is the public JaCoCo API that can be used for integration. JaCoCo is 6 | packed as several bundles. While the bundles formally fulfill the OSGi 7 | specification, there is no dependency on OSGi. They can also be used as 8 | regular JARs in your classpath. 9 |

10 | 11 |

Bundle org.jacoco.core

12 | 13 |

14 | The core bundle implements the code coverage technology itself. It provides 15 | APIs and implementation for 16 |

17 | 18 |
    19 |
  • class file instrumentation,
  • 20 |
  • collecting execution data at runtime and
  • 21 |
  • analyzing coverage data.
  • 22 |
23 | 24 |

Bundle org.jacoco.agent

25 | 26 |

27 | Provides the runtime Java agent (JAR file) as a resource. 28 |

29 | 30 | 31 |

Bundle org.jacoco.report

32 | 33 |

34 | APIs and implementation to create coverage reports in several formats. 35 |

36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.jacoco.examples.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.examples.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.examples.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.examples.test/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.examples.test/src/test/resources/verify-it.groovy: -------------------------------------------------------------------------------- 1 | File realBaseDir = new File(basedir, "../../../target/it-it/build"); 2 | assert new File(realBaseDir, "target/site/jacoco/index.html").exists(); 3 | assert new File(realBaseDir, "target/site/jacoco-it/index.html").exists(); 4 | return true; -------------------------------------------------------------------------------- /org.jacoco.examples.test/src/test/resources/verify-offline.groovy: -------------------------------------------------------------------------------- 1 | File realBaseDir = new File(basedir, "../../../target/it-offline/build"); 2 | assert new File(realBaseDir, "target/site/jacoco/index.html").exists(); 3 | assert !new File(realBaseDir, "target/site/jacoco-it/index.html").exists(); 4 | assert new File(realBaseDir, "build.log").getText().contains(":restore-instrumented-classes"); 5 | return true; -------------------------------------------------------------------------------- /org.jacoco.examples.test/src/test/resources/verify.groovy: -------------------------------------------------------------------------------- 1 | File realBaseDir = new File(basedir, "../../../target/it/build"); 2 | assert new File(realBaseDir, "target/site/jacoco/index.html").exists(); 3 | assert !new File(realBaseDir, "target/site/jacoco-it/index.html").exists(); 4 | return true; -------------------------------------------------------------------------------- /org.jacoco.examples/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.examples/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.examples 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.examples/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | 9 |

About This Content

10 | 11 |

12 | @build.date@ 13 |

14 | 15 |

License

16 | 17 |

18 | All Content in this plug-in is made available by Mountainminds GmbH & Co. 19 | KG, Munich. Unless otherwise indicated below, the Content is provided to you 20 | under the terms and conditions of the Eclipse Public License Version 1.0 21 | ("EPL"). A copy of the EPL is available at 22 | http://www.eclipse.org/legal/epl-v10.html. 23 | For purposes of the EPL, "Program" will mean the Content. 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /org.jacoco.examples/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | distribution 14 | 15 | zip 16 | 17 | false 18 | 19 | 20 | ${basedir}/build 21 | /examples/build 22 | 0644 23 | 0755 24 | true 25 | 26 | 27 | ${basedir}/src/org/jacoco/examples 28 | /examples/java 29 | 0644 30 | 0755 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public class Add implements IExpression { 15 | 16 | private final IExpression l; 17 | 18 | private final IExpression r; 19 | 20 | public Add(final IExpression l, final IExpression r) { 21 | this.l = l; 22 | this.r = r; 23 | } 24 | 25 | public double evaluate() { 26 | return l.evaluate() + r.evaluate(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public class Const implements IExpression { 15 | 16 | private final double value; 17 | 18 | public Const(final double value) { 19 | this.value = value; 20 | } 21 | 22 | public double evaluate() { 23 | return value; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public class Div implements IExpression { 15 | 16 | private final IExpression l; 17 | 18 | private final IExpression r; 19 | 20 | public Div(final IExpression l, final IExpression r) { 21 | this.l = l; 22 | this.r = r; 23 | } 24 | 25 | public double evaluate() { 26 | return l.evaluate() / r.evaluate(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public interface IExpression { 15 | 16 | public double evaluate(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public class Mul implements IExpression { 15 | 16 | private final IExpression l; 17 | 18 | private final IExpression r; 19 | 20 | public Mul(final IExpression l, final IExpression r) { 21 | this.l = l; 22 | this.r = r; 23 | } 24 | 25 | public double evaluate() { 26 | return l.evaluate() * r.evaluate(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.expressions; 13 | 14 | public class Sub implements IExpression { 15 | 16 | private final IExpression l; 17 | 18 | private final IExpression r; 19 | 20 | public Sub(final IExpression l, final IExpression r) { 21 | this.l = l; 22 | this.r = r; 23 | } 24 | 25 | public double evaluate() { 26 | return l.evaluate() - r.evaluate(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.parser; 13 | 14 | import java.io.IOException; 15 | 16 | public class Main { 17 | 18 | public static void main(final String[] args) throws IOException { 19 | for (String expression : args) { 20 | ExpressionParser parser = new ExpressionParser(expression); 21 | double result = parser.parse().evaluate(); 22 | System.out.printf("%s = %s%n", expression, result); 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Mirko Friedenhagen - initial 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.examples.parser; 13 | 14 | public class ExpressionParserIT extends ExpressionParserTest { 15 | } 16 | -------------------------------------------------------------------------------- /org.jacoco.report.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.report.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.report.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report; 13 | 14 | import static org.junit.Assert.assertTrue; 15 | 16 | import java.io.ByteArrayInputStream; 17 | import java.io.ByteArrayOutputStream; 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | /** 22 | * In-memory report output for test purposes. 23 | */ 24 | public class MemoryOutput extends ByteArrayOutputStream { 25 | 26 | private boolean closed = false; 27 | 28 | @Override 29 | public void close() throws IOException { 30 | super.close(); 31 | closed = true; 32 | } 33 | 34 | public InputStream getContentsAsStream() { 35 | return new ByteArrayInputStream(toByteArray()); 36 | } 37 | 38 | public void assertClosed() { 39 | assertTrue(closed); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report.internal.html; 13 | 14 | import javax.xml.parsers.ParserConfigurationException; 15 | 16 | import org.jacoco.report.internal.xml.XMLSupport; 17 | 18 | /** 19 | * Support for verifying XHTML documents. 20 | */ 21 | public class HTMLSupport extends XMLSupport { 22 | 23 | public HTMLSupport() throws ParserConfigurationException { 24 | super(HTMLSupport.class); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /org.jacoco.report/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.jacoco.report/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.report 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | 25 | .settings 26 | 2 27 | PARENT-1-PROJECT_LOC/org.jacoco.core/.settings 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report.check; 13 | 14 | import org.jacoco.core.analysis.ICoverageNode; 15 | 16 | /** 17 | * Call-back interface which is used to report rule violations to. 18 | * 19 | */ 20 | public interface IViolationsOutput { 21 | 22 | /** 23 | * Called for every rule violation. 24 | * 25 | * @param node 26 | * node which violates a rule 27 | * @param rule 28 | * rule which is violated 29 | * @param limit 30 | * limit which is violated 31 | * @param message 32 | * readable message describing this violation 33 | */ 34 | void onViolation(ICoverageNode node, Rule rule, Limit limit, String message); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/check/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Rules check implementation. 15 | */ 16 | package org.jacoco.report.check; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/csv/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * CSV report implementation. 15 | */ 16 | package org.jacoco.report.csv; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/html/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * HTML report implementation. 15 | */ 16 | package org.jacoco.report.html; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report.internal.html.index; 13 | 14 | import org.jacoco.report.internal.html.ILinkable; 15 | 16 | /** 17 | * Every report page that should become part of the index must be added via this 18 | * interface. 19 | */ 20 | public interface IIndexUpdate { 21 | 22 | /** 23 | * Adds a class to the index. 24 | * 25 | * @param link 26 | * link to the class 27 | * @param classid 28 | * identifier of the class 29 | */ 30 | public void addClass(ILinkable link, long classid); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Internal: Index generation for HTML reports. 15 | */ 16 | package org.jacoco.report.internal.html.index; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchfc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchfc.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchnc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchnc.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchpc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/branchpc.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/bundle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/bundle.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/class.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/class.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/down.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/greenbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/greenbar.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/group.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/group.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/method.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/method.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Internal: Resources for HTML reports. 15 | */ 16 | package org.jacoco.report.internal.html.resources; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/package.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/package.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | .str { color: #2A00FF; } 4 | .kwd { color: #7F0055; font-weight:bold; } 5 | .com { color: #3F5FBF; } 6 | .typ { color: #606; } 7 | .lit { color: #066; } 8 | .pun { color: #660; } 9 | .pln { color: #000; } 10 | .tag { color: #008; } 11 | .atn { color: #606; } 12 | .atv { color: #080; } 13 | .dec { color: #606; } 14 | -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/redbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/redbar.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/session.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/session.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/source.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/source.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/resources/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngryTester/jacoco/8dbef2f9373c34cec34a7dc2d90f92096e3cd6a4/org.jacoco.report/src/org/jacoco/report/internal/html/resources/up.gif -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report.internal.html.table; 13 | 14 | import org.jacoco.core.analysis.ICoverageNode; 15 | import org.jacoco.report.internal.html.ILinkable; 16 | 17 | /** 18 | * Interface for a item (row) in a coverage data table. 19 | */ 20 | public interface ITableItem extends ILinkable { 21 | 22 | /** 23 | * Returns the corresponding node data. 24 | * 25 | * @return node data 26 | */ 27 | public ICoverageNode getNode(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | package org.jacoco.report.internal.html.table; 13 | 14 | import java.util.Comparator; 15 | 16 | import org.jacoco.core.analysis.ICoverageNode; 17 | 18 | /** 19 | * Adapter to sort table items based on their coverage nodes. 20 | */ 21 | class TableItemComparator implements Comparator { 22 | 23 | private final Comparator comparator; 24 | 25 | TableItemComparator(final Comparator comparator) { 26 | this.comparator = comparator; 27 | } 28 | 29 | public int compare(final ITableItem i1, final ITableItem i2) { 30 | return comparator.compare(i1.getNode(), i2.getNode()); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Internal: Sortable HTML table for coverage node elements. 15 | */ 16 | package org.jacoco.report.internal.html.table; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Marc R. Hoffmann - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * Common interfaces and utilities for report generation. 15 | */ 16 | package org.jacoco.report; -------------------------------------------------------------------------------- /org.jacoco.report/src/org/jacoco/report/xml/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Brock Janiczak - initial API and implementation 10 | * 11 | *******************************************************************************/ 12 | 13 | /** 14 | * XML report implementation. 15 | */ 16 | package org.jacoco.report.xml; -------------------------------------------------------------------------------- /org.jacoco.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.jacoco.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.jacoco 5 | root 6 | 0.7.9 7 | pom 8 | 9 | 10 | org.jacoco.build 11 | 12 | 13 | 14 | --------------------------------------------------------------------------------