Compare commits
97 commits
Author | SHA1 | Date | |
---|---|---|---|
38d25733fc | |||
0671bdfd7a | |||
926580f12e | |||
7fbe975128 | |||
e9f1fe25d9 | |||
ebef9ea3d5 | |||
c4ba97ff6d | |||
4573055b56 | |||
edbc515eba | |||
09beae6e4e | |||
dad854d7e8 | |||
d373dd26c6 | |||
bff5cd76e6 | |||
2e3d65bd08 | |||
22b0babdd5 | |||
f089ff8c9f | |||
80c4ae0744 | |||
3d8d41ae3d | |||
c0afb715d7 | |||
bc35adebfd | |||
c81b0fac5d | |||
a83bea7f27 | |||
dee9abae13 | |||
a7945aea0c | |||
d20b0d3521 | |||
390bceaf4c | |||
34f933628d | |||
8d4fa46d3c | |||
eb20bb7432 | |||
16cf748853 | |||
7dfb3cda59 | |||
3a67e0e1b6 | |||
9ff912ac7f | |||
e5a56b518c | |||
7028acf4d0 | |||
d49fc24bd7 | |||
c03dc8a894 | |||
9ed731e936 | |||
6243355364 | |||
2412c525dd | |||
4a4fa2fb83 | |||
11bdafa259 | |||
1a2a854a8b | |||
d9a225aa0e | |||
ce56ed6e1d | |||
c26f531329 | |||
1227115805 | |||
4adc28d4a5 | |||
6f62c38a9b | |||
9089cae653 | |||
f70c8c89bf | |||
d568ee486f | |||
393d8736aa | |||
fd54c6bd0e | |||
b67915a310 | |||
cfdb81dad4 | |||
bf097e614a | |||
d0f782a9aa | |||
35dc6d38cc | |||
f8718774ae | |||
9455947111 | |||
44bbb80b0f | |||
3436395de2 | |||
e9c81c731b | |||
6afb669a0b | |||
8a5b9c9431 | |||
6faea5a8f4 | |||
75946b97b0 | |||
44e55db532 | |||
ecdc379b7b | |||
a65e5e1ee1 | |||
e6230a3644 | |||
ec50e5272b | |||
e7ed7edc30 | |||
ec0998caa4 | |||
b6995b05a2 | |||
e19b8de803 | |||
87a55200b3 | |||
6bb66cd907 | |||
ba1d7143b9 | |||
150d02edbf | |||
0637096025 | |||
44ad57c986 | |||
b3a07f72fd | |||
d208038f2d | |||
ef429547d5 | |||
ad06348567 | |||
25c9aa83c3 | |||
1a27995124 | |||
caf67cf115 | |||
033a119801 | |||
5060de11a2 | |||
970eed68e8 | |||
ffaef86c76 | |||
50079786c0 | |||
3592497444 | |||
ba7cec02eb |
41 changed files with 1730 additions and 1426 deletions
31
.github/workflows/bld.yml
vendored
31
.github/workflows/bld.yml
vendored
|
@ -4,29 +4,36 @@ on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bld-project:
|
build-bld-project:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [ 17, 20 ]
|
java-version: [ 17, 21, 24 ]
|
||||||
|
kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ]
|
||||||
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: "zulu"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
- name: Grant execute permission for bld
|
- name: Download dependencies [examples]
|
||||||
run: chmod +x bld
|
working-directory: examples
|
||||||
|
|
||||||
- name: Download the dependencies
|
|
||||||
run: ./bld download
|
run: ./bld download
|
||||||
|
|
||||||
- name: Run tests with bld
|
- name: Run PIT tests [examples]
|
||||||
run: ./bld compile test
|
working-directory: examples
|
||||||
|
run: ./bld compile pit
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: ./bld compile test
|
12
.github/workflows/pages.yml
vendored
12
.github/workflows/pages.yml
vendored
|
@ -30,14 +30,14 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: "zulu"
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Build Javadocs
|
- name: Build Javadocs
|
||||||
|
@ -47,11 +47,11 @@ jobs:
|
||||||
uses: actions/configure-pages@v3
|
uses: actions/configure-pages@v3
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
# Upload generated Javadocs repository
|
# Upload generated Javadocs repository
|
||||||
path: 'build/javadoc/'
|
path: "build/javadoc/"
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v1
|
uses: actions/deploy-pages@v4
|
||||||
|
|
6
.idea/bld.xml
generated
Normal file
6
.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BldConfiguration">
|
||||||
|
<events />
|
||||||
|
</component>
|
||||||
|
</project>
|
2
.idea/copyright/Apache_License.xml
generated
2
.idea/copyright/Apache_License.xml
generated
|
@ -1,6 +1,6 @@
|
||||||
<component name="CopyrightManager">
|
<component name="CopyrightManager">
|
||||||
<copyright>
|
<copyright>
|
||||||
<option name="notice" value="Copyright &#36;today.year the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
<option name="notice" value="Copyright 2023-&#36;today.year the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||||
<option name="myName" value="Apache License" />
|
<option name="myName" value="Apache License" />
|
||||||
</copyright>
|
</copyright>
|
||||||
</component>
|
</component>
|
13
.idea/icon.svg
generated
Normal file
13
.idea/icon.svg
generated
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 179 108" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(1,0,0,1,-210.511,-96.3382)">
|
||||||
|
<g transform="matrix(1,0,0,1,-23.3386,-649.816)">
|
||||||
|
<g transform="matrix(0.221288,0,0,0.24,73.9536,390.254)">
|
||||||
|
<path d="M722.568,1482.92L722.568,1921.1L808.968,1921.1L808.968,1888.7C822.168,1907.9 846.168,1930.1 893.568,1930.1C933.168,1930.1 961.968,1917.5 985.368,1893.5C1012.97,1865.9 1027.37,1827.5 1027.37,1786.1C1027.37,1741.7 1011.17,1705.1 985.368,1680.5C961.968,1658.3 928.968,1644.5 892.368,1644.5C862.968,1644.5 830.568,1654.1 808.968,1683.5L808.968,1482.92L722.568,1482.92ZM871.368,1718.9C888.768,1718.9 903.768,1723.7 917.568,1736.9C930.168,1748.9 938.568,1766.3 938.568,1787.9C938.568,1807.7 930.168,1825.1 917.568,1837.1C904.368,1849.7 887.568,1855.7 872.568,1855.7C856.368,1855.7 837.168,1849.1 823.368,1835.9C813.168,1826.3 803.568,1810.1 803.568,1787.9C803.568,1765.1 812.568,1749.5 822.768,1738.7C836.568,1724.3 852.768,1718.9 871.368,1718.9Z" style="fill:rgb(35,146,255);fill-rule:nonzero;"/>
|
||||||
|
<rect x="1083.77" y="1482.92" width="86.4" height="438.182" style="fill:rgb(250,144,82);fill-rule:nonzero;"/>
|
||||||
|
<path d="M1531.37,1482.92L1444.97,1482.92L1444.97,1683.5C1423.37,1654.1 1390.97,1644.5 1361.57,1644.5C1324.97,1644.5 1291.97,1658.3 1268.57,1680.5C1242.77,1705.1 1226.57,1741.7 1226.57,1786.1C1226.57,1827.5 1240.97,1865.9 1268.57,1893.5C1291.97,1917.5 1320.77,1930.1 1360.37,1930.1C1407.77,1930.1 1431.77,1907.9 1444.97,1888.7L1444.97,1921.1L1531.37,1921.1L1531.37,1482.92ZM1382.57,1718.9C1401.17,1718.9 1417.37,1724.3 1431.17,1738.7C1441.37,1749.5 1450.37,1765.1 1450.37,1787.9C1450.37,1810.1 1440.77,1826.3 1430.57,1835.9C1416.77,1849.1 1397.57,1855.7 1381.37,1855.7C1366.37,1855.7 1349.57,1849.7 1336.37,1837.1C1323.77,1825.1 1315.37,1807.7 1315.37,1787.9C1315.37,1766.3 1323.77,1748.9 1336.37,1736.9C1350.17,1723.7 1365.17,1718.9 1382.57,1718.9Z" style="fill:rgb(35,146,255);fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
|
@ -0,0 +1,204 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaDocConfiguration">
|
||||||
|
<GENERAL>
|
||||||
|
<MODE>UPDATE</MODE>
|
||||||
|
<OVERRIDDEN_METHODS>false</OVERRIDDEN_METHODS>
|
||||||
|
<SPLITTED_CLASS_NAME>true</SPLITTED_CLASS_NAME>
|
||||||
|
<LEVELS>
|
||||||
|
<LEVEL>FIELD</LEVEL>
|
||||||
|
<LEVEL>METHOD</LEVEL>
|
||||||
|
<LEVEL>TYPE</LEVEL>
|
||||||
|
</LEVELS>
|
||||||
|
<VISIBILITIES>
|
||||||
|
<VISIBILITY>PUBLIC</VISIBILITY>
|
||||||
|
<VISIBILITY>PROTECTED</VISIBILITY>
|
||||||
|
<VISIBILITY>DEFAULT</VISIBILITY>
|
||||||
|
</VISIBILITIES>
|
||||||
|
</GENERAL>
|
||||||
|
<TEMPLATES>
|
||||||
|
<CLASSES>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+interface\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The interface ${name}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+enum\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The enum ${name}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+class\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The type ${name}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The type ${name}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
</CLASSES>
|
||||||
|
<CONSTRUCTORS>
|
||||||
|
<CONSTRUCTOR>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Instantiates a new ${name}.\n
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CONSTRUCTOR>
|
||||||
|
</CONSTRUCTORS>
|
||||||
|
<METHODS>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Gets ${partName}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${partName}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Sets ${partName}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${partName}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The entry point of application.\n
|
||||||
|
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
* @param ${element.parameterList.parameters[0].name} the input arguments\n
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* ${name}<#if isNotVoid> ${return}</#if>.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${return}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
</METHODS>
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>^.*(public|protected|private)*.+static.*(\w\s\w)+.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The constant ${element.getName()}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>^.*(public|protected|private)*.*(\w\s\w)+.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
<#if element.parent.isInterface()>
|
||||||
|
* The constant ${element.getName()}.\n
|
||||||
|
<#else>
|
||||||
|
* The ${name}.\n
|
||||||
|
</#if> */</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
<#if element.parent.isEnum()>
|
||||||
|
*${name} ${typeName}.\n
|
||||||
|
<#else>
|
||||||
|
* The ${name}.\n
|
||||||
|
</#if>*/</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TEMPLATES>
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/libraries/bld.xml
generated
7
.idea/libraries/bld.xml
generated
|
@ -2,11 +2,12 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
@ -14,4 +15,4 @@
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
|
|
4
.idea/libraries/compile.xml
generated
4
.idea/libraries/compile.xml
generated
|
@ -7,7 +7,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
.idea/libraries/runtime.xml
generated
4
.idea/libraries/runtime.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
.idea/libraries/test.xml
generated
4
.idea/libraries/test.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
|
@ -4,12 +4,18 @@
|
||||||
<pattern value="rife.bld.extension.PitestOperationBuild" method="jacoco" />
|
<pattern value="rife.bld.extension.PitestOperationBuild" method="jacoco" />
|
||||||
<pattern value="rife.bld.extension.PitestOperationBuild" />
|
<pattern value="rife.bld.extension.PitestOperationBuild" />
|
||||||
<pattern value="rife.bld.extension.PitestOperationBuild" method="pmd" />
|
<pattern value="rife.bld.extension.PitestOperationBuild" method="pmd" />
|
||||||
|
<pattern value="rife.bld.extension.PitestOperationBuild" method="pmdCli" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
<option name="customRuleSets">
|
<option name="customRuleSets">
|
||||||
<list>
|
<list>
|
||||||
<option value="$PROJECT_DIR$/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/config/pmd.xml" />
|
||||||
<option value="$PROJECT_DIR$/../bld-jacoco-report/config/pmd.xml" />
|
<option value="$PROJECT_DIR$/../bld-jacoco-report/config/pmd.xml" />
|
||||||
|
<option value="K:\java\semver\config\pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-checkstyle/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-exec/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-testng/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-generated-version/config/pmd.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
|
|
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
|
@ -5,7 +5,14 @@
|
||||||
"type": "java",
|
"type": "java",
|
||||||
"name": "Run Tests",
|
"name": "Run Tests",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "rife.bld.extension.PitestExtensionTest"
|
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||||
|
"args": [
|
||||||
|
"--details=verbose",
|
||||||
|
"--scan-classpath",
|
||||||
|
"--disable-banner",
|
||||||
|
"--disable-ansi-colors",
|
||||||
|
"--exclude-engine=junit-platform-suite",
|
||||||
|
"--exclude-engine=junit-vintage"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
|
@ -3,13 +3,13 @@
|
||||||
"src/main/java",
|
"src/main/java",
|
||||||
"src/main/resources",
|
"src/main/resources",
|
||||||
"src/test/java",
|
"src/test/java",
|
||||||
"src/bld/java"
|
"src/test/resources",
|
||||||
|
"src/bld/java",
|
||||||
|
"src/bld/resources"
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-1.7.5.jar",
|
"${HOME}/.bld/dist/bld-2.2.1.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/**/*.jar"
|
||||||
"lib/runtime/*.jar",
|
|
||||||
"lib/test/*.jar"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
30
README.md
30
README.md
|
@ -1,13 +1,21 @@
|
||||||
# [PIT Mutation Testing](https://pitest.org/) Extension for [b<span style="color:orange">l</span>d](https://rife2.com/bldb)
|
# [PIT Mutation Testing](https://pitest.org/) Extension for [b<span style="color:orange">l</span>d](https://rife2.com/bld)
|
||||||
|
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||||
[](https://rife2.com/bld)
|
[](https://rife2.com/bld)
|
||||||
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-pitest)
|
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-pitest)
|
||||||
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-pitest)
|
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-pitest)
|
||||||
[](https://github.com/rife2/bld-pitest/actions/workflows/bld.yml)
|
[](https://github.com/rife2/bld-pitest/actions/workflows/bld.yml)
|
||||||
|
|
||||||
To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions).
|
To install the latest version, add the following to the `lib/bld/bld-wrapper.properties` file:
|
||||||
|
|
||||||
|
```properties
|
||||||
|
bld.extension-pitest=com.uwyn.rife2:bld-pitest
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) documentation.
|
||||||
|
|
||||||
|
## Mutation Testing with PIT
|
||||||
|
|
||||||
To run mutation tests and coverage, add the following to your build file:
|
To run mutation tests and coverage, add the following to your build file:
|
||||||
|
|
||||||
|
@ -16,7 +24,7 @@ To run mutation tests and coverage, add the following to your build file:
|
||||||
public void pit() throws Exception {
|
public void pit() throws Exception {
|
||||||
new PitestOperation()
|
new PitestOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.reportDir(Path.of("reports", "mutations").toString())
|
.reportDir(Path.of("reports", "mutations"))
|
||||||
.targetClasses(pkg + ".*")
|
.targetClasses(pkg + ".*")
|
||||||
.targetTests(pkg + ".*")
|
.targetTests(pkg + ".*")
|
||||||
.verbose(true)
|
.verbose(true)
|
||||||
|
@ -24,24 +32,24 @@ public void pit() throws Exception {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```console
|
||||||
./bld compile pit
|
./bld compile pit
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- [View Examples](https://github.com/rife2/bld-pitest/blob/master/examples/src/bld/java/com/example/)
|
- [View Examples Project](https://github.com/rife2/bld-pitest/blob/master/examples/src/bld/java/com/example/)
|
||||||
|
|
||||||
Please check the [PitestOperation documentation](https://rife2.github.io/bld-pitest/rife/bld/extension/PitestOperation.html#method-summary) for all available configuration options.
|
Please check the [PitestOperation documentation](https://rife2.github.io/bld-pitest/rife/bld/extension/PitestOperation.html#method-summary) for all available configuration options.
|
||||||
|
|
||||||
### Pitest (PIT) Dependency
|
## Pitest (PIT) Dependency
|
||||||
|
|
||||||
Don't forget to add the Pitest `test` dependencies to your build file, as they are not provided by the extension. For example:
|
Don't forget to add the Pitest `test` dependencies to your build file, as they are not provided by the extension. For example:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
repositories = List.of(MAVEN_CENTRAL);
|
repositories = List.of(MAVEN_CENTRAL);
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.pitest", "pitest", version(1, 14, 4)))
|
.include(dependency("org.pitest", "pitest", version(1, 19, 1)))
|
||||||
.include(dependency("org.pitest", "pitest-command-line", version(1, 14, 4)))
|
.include(dependency("org.pitest", "pitest-command-line", version(1, 17, 4)))
|
||||||
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 0)))
|
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 2)))
|
||||||
.include(dependency("org.pitest", "pitest-testng-plugin", version(1, 0, 0)));
|
.include(dependency("org.pitest", "pitest-testng-plugin", version(1, 0, 0)));
|
||||||
```
|
```
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<!-- BEST PRACTICES -->
|
<!-- BEST PRACTICES -->
|
||||||
<rule ref="category/java/bestpractices.xml">
|
<rule ref="category/java/bestpractices.xml">
|
||||||
<exclude name="AvoidPrintStackTrace"/>
|
<exclude name="AvoidPrintStackTrace"/>
|
||||||
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
|
|
||||||
<exclude name="JUnitTestContainsTooManyAsserts"/>
|
|
||||||
<exclude name="GuardLogStatement"/>
|
<exclude name="GuardLogStatement"/>
|
||||||
|
<exclude name="UnitTestContainsTooManyAsserts"/>
|
||||||
|
<exclude name="UnitTestShouldUseTestAnnotation"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="category/java/bestpractices.xml/MissingOverride">
|
<rule ref="category/java/bestpractices.xml/MissingOverride">
|
||||||
|
@ -19,12 +19,13 @@
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
<!-- CODE STYLE -->
|
<!-- CODE STYLE -->
|
||||||
<rule ref="category/java/codestyle.xml">
|
<rule ref="category/java/codestyle.xml">
|
||||||
<exclude name="AtLeastOneConstructor"/>
|
<exclude name="AtLeastOneConstructor"/>
|
||||||
<exclude name="ClassNamingConventions"/>
|
<exclude name="ClassNamingConventions"/>
|
||||||
<exclude name="ConfusingTernary"/>
|
|
||||||
<exclude name="CommentDefaultAccessModifier"/>
|
<exclude name="CommentDefaultAccessModifier"/>
|
||||||
|
<exclude name="ConfusingTernary"/>
|
||||||
<exclude name="FieldNamingConventions"/>
|
<exclude name="FieldNamingConventions"/>
|
||||||
<exclude name="LocalVariableCouldBeFinal"/>
|
<exclude name="LocalVariableCouldBeFinal"/>
|
||||||
<exclude name="LongVariable"/>
|
<exclude name="LongVariable"/>
|
||||||
|
@ -34,8 +35,9 @@
|
||||||
<exclude name="ShortClassName"/>
|
<exclude name="ShortClassName"/>
|
||||||
<exclude name="ShortMethodName"/>
|
<exclude name="ShortMethodName"/>
|
||||||
<exclude name="ShortVariable"/>
|
<exclude name="ShortVariable"/>
|
||||||
<exclude name="UselessParentheses"/>
|
<exclude name="UseExplicitTypes"/>
|
||||||
<exclude name="UseUnderscoresInNumericLiterals"/>
|
<exclude name="UseUnderscoresInNumericLiterals"/>
|
||||||
|
<exclude name="UselessParentheses"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="category/java/codestyle.xml/UnnecessaryImport">
|
<rule ref="category/java/codestyle.xml/UnnecessaryImport">
|
||||||
|
@ -51,8 +53,6 @@
|
||||||
<exclude name="AvoidUncheckedExceptionsInSignatures"/>
|
<exclude name="AvoidUncheckedExceptionsInSignatures"/>
|
||||||
<exclude name="CognitiveComplexity"/>
|
<exclude name="CognitiveComplexity"/>
|
||||||
<exclude name="CyclomaticComplexity"/>
|
<exclude name="CyclomaticComplexity"/>
|
||||||
<exclude name="ExcessiveClassLength"/>
|
|
||||||
<exclude name="ExcessiveMethodLength"/>
|
|
||||||
<exclude name="ExcessiveParameterList"/>
|
<exclude name="ExcessiveParameterList"/>
|
||||||
<exclude name="ExcessivePublicCount"/>
|
<exclude name="ExcessivePublicCount"/>
|
||||||
<exclude name="GodClass"/>
|
<exclude name="GodClass"/>
|
||||||
|
@ -106,4 +106,4 @@
|
||||||
<!-- SECURITY -->
|
<!-- SECURITY -->
|
||||||
<rule ref="category/java/security.xml">
|
<rule ref="category/java/security.xml">
|
||||||
</rule>
|
</rule>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
5
examples/.gitignore
vendored
5
examples/.gitignore
vendored
|
@ -52,4 +52,7 @@ atlassian-ide-plugin.xml
|
||||||
.idea/sonarlint/
|
.idea/sonarlint/
|
||||||
|
|
||||||
# Editor-based Rest Client
|
# Editor-based Rest Client
|
||||||
.idea/httpRequests
|
.idea/httpRequests
|
||||||
|
|
||||||
|
|
||||||
|
reports
|
1
examples/.idea/.name
generated
Normal file
1
examples/.idea/.name
generated
Normal file
|
@ -0,0 +1 @@
|
||||||
|
bld-pitest-examples
|
7
examples/.idea/libraries/bld.xml
generated
7
examples/.idea/libraries/bld.xml
generated
|
@ -2,11 +2,12 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
|
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
@ -14,4 +15,4 @@
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
||||||
|
|
4
examples/.idea/libraries/compile.xml
generated
4
examples/.idea/libraries/compile.xml
generated
|
@ -7,7 +7,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
examples/.idea/libraries/runtime.xml
generated
4
examples/.idea/libraries/runtime.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
4
examples/.idea/libraries/test.xml
generated
4
examples/.idea/libraries/test.xml
generated
|
@ -8,7 +8,7 @@
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
1
examples/.idea/misc.xml
generated
1
examples/.idea/misc.xml
generated
|
@ -1,4 +1,3 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="EntryPointsManager">
|
<component name="EntryPointsManager">
|
||||||
<pattern value="com.example.ExamplesBuild" />
|
<pattern value="com.example.ExamplesBuild" />
|
||||||
|
|
9
examples/.vscode/launch.json
vendored
9
examples/.vscode/launch.json
vendored
|
@ -5,7 +5,14 @@
|
||||||
"type": "java",
|
"type": "java",
|
||||||
"name": "Run Tests",
|
"name": "Run Tests",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "com.example.ExamplesTest"
|
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||||
|
"args": [
|
||||||
|
"--details=verbose",
|
||||||
|
"--scan-classpath",
|
||||||
|
"--disable-banner",
|
||||||
|
"--disable-ansi-colors",
|
||||||
|
"--exclude-engine=junit-platform-suite",
|
||||||
|
"--exclude-engine=junit-vintage"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
10
examples/.vscode/settings.json
vendored
10
examples/.vscode/settings.json
vendored
|
@ -3,13 +3,13 @@
|
||||||
"src/main/java",
|
"src/main/java",
|
||||||
"src/main/resources",
|
"src/main/resources",
|
||||||
"src/test/java",
|
"src/test/java",
|
||||||
"src/bld/java"
|
"src/test/resources",
|
||||||
|
"src/bld/java",
|
||||||
|
"src/bld/resources"
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-1.7.5.jar",
|
"${HOME}/.bld/dist/bld-2.2.1.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/**/*.jar"
|
||||||
"lib/runtime/*.jar",
|
|
||||||
"lib/test/*.jar"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
5
examples/README.md
Normal file
5
examples/README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Run and Generate Pit Test Coverage Report
|
||||||
|
|
||||||
|
```console
|
||||||
|
./bld compile pit
|
||||||
|
```
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=com.uwyn.rife2:bld-pitest:0.9.0
|
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
|
bld.extension-pitest=com.uwyn.rife2:bld-pitest:1.0.10
|
||||||
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=1.7.5
|
bld.version=2.2.1
|
||||||
|
|
|
@ -1,166 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
<h1>ExamplesLib.java</h1>
|
|
||||||
|
|
||||||
<table class="src">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_1'/>
|
|
||||||
1
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_1'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>package com.example;</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_2'/>
|
|
||||||
2
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_2'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='covered'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_3'/>
|
|
||||||
3
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_3'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class='covered'><pre><span class=''>public class ExamplesLib {</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_4'/>
|
|
||||||
4
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_4'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''> public String getMessage() {</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='covered'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_5'/>
|
|
||||||
5
|
|
||||||
</td>
|
|
||||||
<td class='killed'>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_5'>1</a>
|
|
||||||
<span>
|
|
||||||
1. getMessage : replaced return value with "" for com/example/ExamplesLib::getMessage → KILLED<br/>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class='covered'><pre><span class='killed'> return "Hello World!";</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_6'/>
|
|
||||||
6
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_6'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''> }</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@5c671d7f_7'/>
|
|
||||||
7
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_7'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>}</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@5c671d7f_5'>5</a></td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@5c671d7f_5'/>
|
|
||||||
|
|
||||||
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getMessage<br/><b>Killed by : </b>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()]</span></span> replaced return value with "" for com/example/ExamplesLib::getMessage → KILLED</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Active mutators</h2>
|
|
||||||
<ul>
|
|
||||||
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
|
|
||||||
<li class='mutator'>EMPTY_RETURNS</li>
|
|
||||||
<li class='mutator'>FALSE_RETURNS</li>
|
|
||||||
<li class='mutator'>INCREMENTS</li>
|
|
||||||
<li class='mutator'>INVERT_NEGS</li>
|
|
||||||
<li class='mutator'>MATH</li>
|
|
||||||
<li class='mutator'>NEGATE_CONDITIONALS</li>
|
|
||||||
<li class='mutator'>NULL_RETURNS</li>
|
|
||||||
<li class='mutator'>PRIMITIVE_RETURNS</li>
|
|
||||||
<li class='mutator'>TRUE_RETURNS</li>
|
|
||||||
<li class='mutator'>VOID_METHOD_CALLS</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Tests examined</h2>
|
|
||||||
<ul>
|
|
||||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (8 ms)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
Report generated by <a href='https://pitest.org'>PIT</a> 1.15.1
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,241 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
<h1>ExamplesTest.java</h1>
|
|
||||||
|
|
||||||
<table class="src">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_1'/>
|
|
||||||
1
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_1'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>package com.example;</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_2'/>
|
|
||||||
2
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_2'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_3'/>
|
|
||||||
3
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_3'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>import org.junit.jupiter.api.Test;</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_4'/>
|
|
||||||
4
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_4'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_5'/>
|
|
||||||
5
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_5'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>import static org.junit.jupiter.api.Assertions.assertEquals;</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_6'/>
|
|
||||||
6
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_6'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='covered'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_7'/>
|
|
||||||
7
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_7'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class='covered'><pre><span class=''>public class ExamplesTest {</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_8'/>
|
|
||||||
8
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_8'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''> @Test</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_9'/>
|
|
||||||
9
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_9'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''> void verifyHello() {</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='covered'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_10'/>
|
|
||||||
10
|
|
||||||
</td>
|
|
||||||
<td class='survived'>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_10'>1</a>
|
|
||||||
<span>
|
|
||||||
1. verifyHello : removed call to org/junit/jupiter/api/Assertions::assertEquals → SURVIVED<br/>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class='covered'><pre><span class='survived'> assertEquals("Hello World!", new ExamplesLib().getMessage());</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='covered'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_11'/>
|
|
||||||
11
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_11'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class='covered'><pre><span class=''> }</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class='na'>
|
|
||||||
<a name='org.pitest.mutationtest.report.html.SourceFile@1f59a598_12'/>
|
|
||||||
12
|
|
||||||
</td>
|
|
||||||
<td class=''>
|
|
||||||
<span class='pop'>
|
|
||||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_12'></a>
|
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class=''><pre><span class=''>}</span></pre></td></tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@1f59a598_10'>10</a></td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@1f59a598_10'/>
|
|
||||||
|
|
||||||
<p class='SURVIVED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>verifyHello<br/><b>Killed by : </b>none</span></span> removed call to org/junit/jupiter/api/Assertions::assertEquals → SURVIVED</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Active mutators</h2>
|
|
||||||
<ul>
|
|
||||||
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
|
|
||||||
<li class='mutator'>EMPTY_RETURNS</li>
|
|
||||||
<li class='mutator'>FALSE_RETURNS</li>
|
|
||||||
<li class='mutator'>INCREMENTS</li>
|
|
||||||
<li class='mutator'>INVERT_NEGS</li>
|
|
||||||
<li class='mutator'>MATH</li>
|
|
||||||
<li class='mutator'>NEGATE_CONDITIONALS</li>
|
|
||||||
<li class='mutator'>NULL_RETURNS</li>
|
|
||||||
<li class='mutator'>PRIMITIVE_RETURNS</li>
|
|
||||||
<li class='mutator'>TRUE_RETURNS</li>
|
|
||||||
<li class='mutator'>VOID_METHOD_CALLS</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Tests examined</h2>
|
|
||||||
<ul>
|
|
||||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (8 ms)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
Report generated by <a href='https://pitest.org'>PIT</a> 1.15.1
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,69 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Pit Test Coverage Report</h1>
|
|
||||||
<h2>Package Summary</h2>
|
|
||||||
<h3>com.example</h3>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Number of Classes</th>
|
|
||||||
<th>Line Coverage</th>
|
|
||||||
<th>Mutation Coverage</th>
|
|
||||||
<th>Test Strength</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>2</td>
|
|
||||||
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
|
||||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Breakdown by Class</h3>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Line Coverage</th>
|
|
||||||
<th>Mutation Coverage</th>
|
|
||||||
<th>Test Strength</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="./ExamplesLib.java.html">ExamplesLib.java</a></td>
|
|
||||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">2/2</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">1/1</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">1/1</div></div></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="./ExamplesTest.java.html">ExamplesTest.java</a></td>
|
|
||||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">0% </div><div class="coverage_bar"><div class="coverage_complete width-0"></div><div class="coverage_legend">0/1</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">0% </div><div class="coverage_bar"><div class="coverage_complete width-0"></div><div class="coverage_legend">0/1</div></div></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
Report generated by <a href='https://pitest.org'>PIT</a> 1.15.1
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,69 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Pit Test Coverage Report</h1>
|
|
||||||
|
|
||||||
<h3>Project Summary</h3>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Number of Classes</th>
|
|
||||||
<th>Line Coverage</th>
|
|
||||||
<th>Mutation Coverage</th>
|
|
||||||
<th>Test Strength</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>2</td>
|
|
||||||
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
|
||||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Breakdown by Package</h3>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Number of Classes</th>
|
|
||||||
<th>Line Coverage</th>
|
|
||||||
<th>Mutation Coverage</th>
|
|
||||||
<th>Test Strength</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><a href="./com.example/index.html">com.example</a></td>
|
|
||||||
<td>2</td>
|
|
||||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">50% </div><div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
<td><div class="coverage_percentage">50% </div><div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
Report generated by <a href='https://pitest.org'>PIT</a> 1.15.1
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
Enhanced functionality available at <a href='https://www.arcmutate.com/'>arcmutate.com</a>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,563 +0,0 @@
|
||||||
html, body, div, span, p, blockquote, pre {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
outline: 0;
|
|
||||||
font-weight: inherit;
|
|
||||||
font-style: inherit;
|
|
||||||
font-size: 100%;
|
|
||||||
font-family: inherit;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
body{
|
|
||||||
line-height: 1;
|
|
||||||
color: black;
|
|
||||||
background: white;
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.src {
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-right: 5px;
|
|
||||||
padding-left: 5px;
|
|
||||||
font-family: Consolas, Courier, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.covered, .COVERED {
|
|
||||||
background-color: #ddffdd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uncovered, .UNCOVERED {
|
|
||||||
background-color: #ffdddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.killed, .KILLED {
|
|
||||||
background-color: #aaffaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.survived, .SURVIVED {
|
|
||||||
background-color: #ffaaaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uncertain, .UNCERTAIN {
|
|
||||||
background-color: #dde7ef;
|
|
||||||
}
|
|
||||||
|
|
||||||
.run_error, .RUN_ERROR {
|
|
||||||
background-color: #dde7ef;
|
|
||||||
}
|
|
||||||
|
|
||||||
.na {
|
|
||||||
background-color: #eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timed_out, .TIMED_OUT {
|
|
||||||
background-color: #dde7ef;
|
|
||||||
}
|
|
||||||
|
|
||||||
.non_viable, .NON_VIABLE {
|
|
||||||
background-color: #aaffaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.memory_error, .MEMORY_ERROR {
|
|
||||||
background-color: #dde7ef;
|
|
||||||
}
|
|
||||||
|
|
||||||
.not_started, .NO_STARTED {
|
|
||||||
background-color: #dde7ef; color : red
|
|
||||||
}
|
|
||||||
|
|
||||||
.no_coverage, .NO_COVERAGE {
|
|
||||||
background-color: #ffaaaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tests {
|
|
||||||
width: 50%;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mutees {
|
|
||||||
float: right;
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
padding-top: 20px;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coverage_bar {
|
|
||||||
display: inline-block;
|
|
||||||
height: 1.1em;
|
|
||||||
width: 130px;
|
|
||||||
background: #FAA;
|
|
||||||
margin: 0 5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
border: 1px solid #AAA;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coverage_complete {
|
|
||||||
display: inline-block;
|
|
||||||
height: 100%;
|
|
||||||
background: #DFD;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coverage_legend {
|
|
||||||
position: absolute;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line, .mut {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coverage_percentage {
|
|
||||||
display: inline-block;
|
|
||||||
width: 3em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop {
|
|
||||||
outline:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop strong {
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop span {
|
|
||||||
z-index: 10;
|
|
||||||
display: none;
|
|
||||||
padding: 14px 20px;
|
|
||||||
margin-top: -30px;
|
|
||||||
margin-left: 28px;
|
|
||||||
width: 800px;
|
|
||||||
line-height: 16px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-box-shadow: 5px 5px 8px #CCC;
|
|
||||||
-webkit-box-shadow: 5px 5px 8px #CCC;
|
|
||||||
box-shadow: 5px 5px 8px #CCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop:hover span {
|
|
||||||
display: inline;
|
|
||||||
position: absolute;
|
|
||||||
color: #111;
|
|
||||||
border: 1px solid #DCA;
|
|
||||||
background: #fffAF0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-1 {
|
|
||||||
width: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-2 {
|
|
||||||
width: 2%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-3 {
|
|
||||||
width: 3%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-4 {
|
|
||||||
width: 4%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-5 {
|
|
||||||
width: 5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-6 {
|
|
||||||
width: 6%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-7 {
|
|
||||||
width: 7%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-8 {
|
|
||||||
width: 8%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-9 {
|
|
||||||
width: 9%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-10 {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-11 {
|
|
||||||
width: 11%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-12 {
|
|
||||||
width: 12%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-13 {
|
|
||||||
width: 13%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-14 {
|
|
||||||
width: 14%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-15 {
|
|
||||||
width: 15%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-16 {
|
|
||||||
width: 16%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-17 {
|
|
||||||
width: 17%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-18 {
|
|
||||||
width: 18%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-19 {
|
|
||||||
width: 19%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-20 {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-21 {
|
|
||||||
width: 21%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-22 {
|
|
||||||
width: 22%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-23 {
|
|
||||||
width: 23%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-24 {
|
|
||||||
width: 24%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-25 {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-26 {
|
|
||||||
width: 26%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-27 {
|
|
||||||
width: 27%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-28 {
|
|
||||||
width: 28%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-29 {
|
|
||||||
width: 29%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-30 {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-31 {
|
|
||||||
width: 31%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-32 {
|
|
||||||
width: 32%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-33 {
|
|
||||||
width: 33%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-34 {
|
|
||||||
width: 34%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-35 {
|
|
||||||
width: 35%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-36 {
|
|
||||||
width: 36%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-37 {
|
|
||||||
width: 37%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-38 {
|
|
||||||
width: 38%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-39 {
|
|
||||||
width: 39%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-40 {
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-41 {
|
|
||||||
width: 41%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-42 {
|
|
||||||
width: 42%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-43 {
|
|
||||||
width: 43%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-44 {
|
|
||||||
width: 44%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-45 {
|
|
||||||
width: 45%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-46 {
|
|
||||||
width: 46%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-47 {
|
|
||||||
width: 47%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-48 {
|
|
||||||
width: 48%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-49 {
|
|
||||||
width: 49%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-50 {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-51 {
|
|
||||||
width: 51%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-52 {
|
|
||||||
width: 52%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-53 {
|
|
||||||
width: 53%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-54 {
|
|
||||||
width: 54%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-55 {
|
|
||||||
width: 55%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-56 {
|
|
||||||
width: 56%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-57 {
|
|
||||||
width: 57%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-58 {
|
|
||||||
width: 58%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-59 {
|
|
||||||
width: 59%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-60 {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-61 {
|
|
||||||
width: 61%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-62 {
|
|
||||||
width: 62%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-63 {
|
|
||||||
width: 63%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-64 {
|
|
||||||
width: 64%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-65 {
|
|
||||||
width: 65%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-66 {
|
|
||||||
width: 66%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-67 {
|
|
||||||
width: 67%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-68 {
|
|
||||||
width: 68%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-69 {
|
|
||||||
width: 69%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-70 {
|
|
||||||
width: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-71 {
|
|
||||||
width: 71%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-72 {
|
|
||||||
width: 72%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-73 {
|
|
||||||
width: 73%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-74 {
|
|
||||||
width: 74%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-75 {
|
|
||||||
width: 75%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-76 {
|
|
||||||
width: 76%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-77 {
|
|
||||||
width: 77%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-78 {
|
|
||||||
width: 78%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-79 {
|
|
||||||
width: 79%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-80 {
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-81 {
|
|
||||||
width: 81%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-82 {
|
|
||||||
width: 82%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-83 {
|
|
||||||
width: 83%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-84 {
|
|
||||||
width: 84%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-85 {
|
|
||||||
width: 85%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-86 {
|
|
||||||
width: 86%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-87 {
|
|
||||||
width: 87%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-88 {
|
|
||||||
width: 88%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-89 {
|
|
||||||
width: 89%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-90 {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-91 {
|
|
||||||
width: 91%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-92 {
|
|
||||||
width: 92%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-93 {
|
|
||||||
width: 93%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-94 {
|
|
||||||
width: 94%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-95 {
|
|
||||||
width: 95%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-96 {
|
|
||||||
width: 96%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-97 {
|
|
||||||
width: 97%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-98 {
|
|
||||||
width: 98%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-99 {
|
|
||||||
width: 99%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.width-100 {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
|
@ -7,6 +7,9 @@ import rife.tools.FileUtils;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.ConsoleHandler;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Scope.test;
|
import static rife.bld.dependencies.Scope.test;
|
||||||
|
|
||||||
|
@ -19,17 +22,33 @@ public class ExamplesBuild extends Project {
|
||||||
name = "Examples";
|
name = "Examples";
|
||||||
version = version(0, 1, 0);
|
version = version(0, 1, 0);
|
||||||
|
|
||||||
|
javaRelease = 17;
|
||||||
|
|
||||||
|
downloadSources = true;
|
||||||
|
autoDownloadPurge = true;
|
||||||
|
|
||||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||||
|
|
||||||
|
var pitest = version(1, 19, 1);
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.pitest", "pitest", version(1, 15, 1)))
|
.include(dependency("org.pitest", "pitest", pitest))
|
||||||
.include(dependency("org.pitest", "pitest-command-line", version(1, 15, 1)))
|
.include(dependency("org.pitest", "pitest-command-line", pitest))
|
||||||
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 0)))
|
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 2)))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)));
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
// Enable detailed logging for the extensions
|
||||||
|
var level = Level.ALL;
|
||||||
|
var logger = Logger.getLogger("rife.bld.extension");
|
||||||
|
var consoleHandler = new ConsoleHandler();
|
||||||
|
|
||||||
|
consoleHandler.setLevel(level);
|
||||||
|
logger.addHandler(consoleHandler);
|
||||||
|
logger.setLevel(level);
|
||||||
|
logger.setUseParentHandlers(false);
|
||||||
|
|
||||||
new ExamplesBuild().start(args);
|
new ExamplesBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,10 +56,10 @@ public class ExamplesBuild extends Project {
|
||||||
public void pit() throws Exception {
|
public void pit() throws Exception {
|
||||||
new PitestOperation()
|
new PitestOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.reportDir(Path.of("reports", "mutations").toString())
|
.reportDir(Path.of("reports", "mutations"))
|
||||||
.targetClasses(pkg + ".*")
|
.targetClasses(pkg + ".*")
|
||||||
.targetTests(pkg + ".*")
|
.targetTests(pkg + ".*")
|
||||||
.verbose(true)
|
.verbose(true)
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.3
|
|
||||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
|
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.5
|
||||||
|
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.2
|
||||||
|
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=1.7.5
|
bld.version=2.2.1
|
||||||
|
|
12
scripts/checkcliargs.sh
Executable file
12
scripts/checkcliargs.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
main="org.pitest.mutationtest.commandline.MutationCoverageReport"
|
||||||
|
new=/tmp/checkcliargs-new
|
||||||
|
old=/tmp/checkcliargs-old
|
||||||
|
|
||||||
|
java -cp "lib/test/*" $main --help >$new
|
||||||
|
java -cp "examples/lib/test/*" $main --help >$old
|
||||||
|
|
||||||
|
diff $old $new
|
||||||
|
|
||||||
|
rm -rf $new $old
|
7
scripts/cliargs.sh
Executable file
7
scripts/cliargs.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
java -cp "lib/test/*" org.pitest.mutationtest.commandline.MutationCoverageReport --help |\
|
||||||
|
grep "^.*--.*" |\
|
||||||
|
sed -e "s/\* --/--/" -e "s/ .*//" |\
|
||||||
|
sort |\
|
||||||
|
sed -e '/testPlugin/d' -e '/--help/d' -e '/---/d' > src/test/resources/pitest-args.txt
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2023 the original author or authors.
|
* Copyright 2023-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -22,57 +22,72 @@ import rife.bld.publish.PublishDeveloper;
|
||||||
import rife.bld.publish.PublishLicense;
|
import rife.bld.publish.PublishLicense;
|
||||||
import rife.bld.publish.PublishScm;
|
import rife.bld.publish.PublishScm;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
import static rife.bld.dependencies.Repository.*;
|
||||||
import static rife.bld.dependencies.Repository.RIFE2_RELEASES;
|
|
||||||
import static rife.bld.dependencies.Scope.compile;
|
import static rife.bld.dependencies.Scope.compile;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
import static rife.bld.dependencies.Scope.test;
|
||||||
import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING;
|
import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING;
|
||||||
|
|
||||||
public class PitestOperationBuild extends Project {
|
public class PitestOperationBuild extends Project {
|
||||||
|
final PmdOperation pmdOp = new PmdOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.failOnViolation(true)
|
||||||
|
.ruleSets("config/pmd.xml");
|
||||||
|
|
||||||
public PitestOperationBuild() {
|
public PitestOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "PitestExtension";
|
name = "PitestExtension";
|
||||||
version = version(0, 9, 0);
|
version = version(1, 0, 11, "SNAPSHOT");
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
|
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
autoDownloadPurge = true;
|
autoDownloadPurge = true;
|
||||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
|
||||||
|
|
||||||
var pitest = version(1, 15, 1);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
|
||||||
|
|
||||||
|
var pitest = version(1, 19, 1);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
|
.include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1)));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.pitest", "pitest", pitest))
|
.include(dependency("org.pitest", "pitest", pitest))
|
||||||
.include(dependency("org.pitest", "pitest-command-line", pitest))
|
.include(dependency("org.pitest", "pitest-command-line", pitest))
|
||||||
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1,2, 0)))
|
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 2)))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1)))
|
||||||
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
|
.include(dependency("org.assertj", "assertj-core", version(3, 27, 3)));
|
||||||
|
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
.author()
|
||||||
.docLint(NO_MISSING)
|
.docLint(NO_MISSING)
|
||||||
.link("https://rife2.github.io/bld/")
|
.link("https://rife2.github.io/bld/")
|
||||||
.link("https://rife2.github.io/rife2/");
|
.link("https://rife2.github.io/rife2/");
|
||||||
|
|
||||||
publishOperation()
|
publishOperation()
|
||||||
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
|
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
|
||||||
|
.repository(repository("github"))
|
||||||
.info()
|
.info()
|
||||||
.groupId("com.uwyn.rife2")
|
.groupId("com.uwyn.rife2")
|
||||||
.artifactId("bld-pitest")
|
.artifactId("bld-pitest")
|
||||||
.description("PIT Mutation Testing Extension for bld")
|
.description("PIT Mutation Testing Extension for bld")
|
||||||
.url("https://github.com/rife2/bld-pitest")
|
.url("https://github.com/rife2/bld-pitest")
|
||||||
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net")
|
.developer(new PublishDeveloper()
|
||||||
.url("https://erik.thauvin.net/"))
|
.id("ethauvin")
|
||||||
.license(new PublishLicense().name("The Apache License, Version 2.0")
|
.name("Erik C. Thauvin")
|
||||||
.url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
|
.email("erik@thauvin.net")
|
||||||
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-pitest.git")
|
.url("https://erik.thauvin.net/")
|
||||||
|
)
|
||||||
|
.license(new PublishLicense()
|
||||||
|
.name("The Apache License, Version 2.0")
|
||||||
|
.url("https://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||||
|
)
|
||||||
|
.scm(new PublishScm()
|
||||||
|
.connection("scm:git:https://github.com/rife2/bld-pitest.git")
|
||||||
.developerConnection("scm:git:git@github.com:rife2/bld-pitest.git")
|
.developerConnection("scm:git:git@github.com:rife2/bld-pitest.git")
|
||||||
.url("https://github.com/rife2/bld-pitest"))
|
.url("https://github.com/rife2/bld-pitest")
|
||||||
|
)
|
||||||
.signKey(property("sign.key"))
|
.signKey(property("sign.key"))
|
||||||
.signPassphrase(property("sign.passphrase"));
|
.signPassphrase(property("sign.passphrase"));
|
||||||
}
|
}
|
||||||
|
@ -81,19 +96,25 @@ public class PitestOperationBuild extends Project {
|
||||||
new PitestOperationBuild().start(args);
|
new PitestOperationBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
@BuildCommand(summary = "Runs PMD analysis")
|
||||||
public void jacoco() throws IOException {
|
public void pmd() throws Exception {
|
||||||
new JacocoReportOperation()
|
pmdOp.execute();
|
||||||
.fromProject(this)
|
|
||||||
.execute();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Runs PMD analysis")
|
@BuildCommand(value = "pmd-cli", summary = "Runs PMD analysis (CLI)")
|
||||||
public void pmd() {
|
public void pmdCli() throws Exception {
|
||||||
new PmdOperation()
|
pmdOp.includeLineNumber(false).execute();
|
||||||
.fromProject(this)
|
}
|
||||||
.failOnViolation(true)
|
|
||||||
.ruleSets("config/pmd.xml")
|
@Override
|
||||||
.execute();
|
public void test() throws Exception {
|
||||||
|
var os = System.getProperty("os.name");
|
||||||
|
if (os != null && os.toLowerCase().contains("linux")) {
|
||||||
|
new ExecOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.command("scripts/cliargs.sh")
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
super.test();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2023 the original author or authors.
|
* Copyright 2023-2025 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -16,32 +16,40 @@
|
||||||
|
|
||||||
package rife.bld.extension;
|
package rife.bld.extension;
|
||||||
|
|
||||||
|
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||||
|
import org.junit.jupiter.api.condition.OS;
|
||||||
import rife.bld.BaseProject;
|
import rife.bld.BaseProject;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.WebProject;
|
import rife.bld.WebProject;
|
||||||
|
import rife.bld.operations.exceptions.ExitStatusException;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||||
import static rife.bld.extension.PitestOperation.*;
|
import static rife.bld.extension.PitestOperation.FALSE;
|
||||||
|
import static rife.bld.extension.PitestOperation.TRUE;
|
||||||
|
|
||||||
|
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
|
||||||
class PitestOperationTest {
|
class PitestOperationTest {
|
||||||
private static final String AS_LIST = "as list";
|
private static final String AS_LIST = "as list";
|
||||||
private final static String BAR = "bar";
|
private static final String BAR = "bar";
|
||||||
private final static String FOO = "foo";
|
private static final String FOO = "foo";
|
||||||
private final static String FOOBAR = FOO + ',' + BAR;
|
private static final String FOOBAR = FOO + ',' + BAR;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void argLine() {
|
void argLine() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.argLine(FOO);
|
.argLine(FOO);
|
||||||
assertThat(op.options.get("--argLine")).isEqualTo(FOO);
|
assertThat(op.options().get("--argLine")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -49,12 +57,87 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.avoidCallsTo(FOO, BAR);
|
.avoidCallsTo(FOO, BAR);
|
||||||
assertThat(op.options.get("--avoidCallsTo")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--avoidCallsTo")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.avoidCallsTo(List.of(FOO, BAR));
|
.avoidCallsTo(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@EnabledOnOs(OS.LINUX)
|
||||||
|
void checkAllParameters() throws IOException {
|
||||||
|
var args = Files.readAllLines(Paths.get("src", "test", "resources", "pitest-args.txt"));
|
||||||
|
|
||||||
|
assertThat(args).isNotEmpty();
|
||||||
|
|
||||||
|
var params = new PitestOperation()
|
||||||
|
.fromProject(new BaseProject())
|
||||||
|
.argLine(FOO)
|
||||||
|
.avoidCallsTo(FOO, BAR)
|
||||||
|
.classPath(FOO, BAR)
|
||||||
|
.classPathFile(FOO)
|
||||||
|
.coverageThreshold(0)
|
||||||
|
.detectInlinedCode(false)
|
||||||
|
.dryRun(false)
|
||||||
|
.excludedClasses("class")
|
||||||
|
.excludedClasses(List.of(FOO, BAR))
|
||||||
|
.excludedGroups("group")
|
||||||
|
.excludedGroups(List.of(FOO, BAR))
|
||||||
|
.excludedMethods("method")
|
||||||
|
.excludedMethods(List.of(FOO, BAR))
|
||||||
|
.excludedRunners("runners")
|
||||||
|
.excludedTestClasses("test")
|
||||||
|
.exportLineCoverage(true)
|
||||||
|
.failWhenNoMutations(true)
|
||||||
|
.features("feature")
|
||||||
|
.fullMutationMatrix(true)
|
||||||
|
.historyInputLocation("inputLocation")
|
||||||
|
.historyOutputLocation("outputLocation")
|
||||||
|
.includeLaunchClasspath(true)
|
||||||
|
.includedGroups("group")
|
||||||
|
.includedTestMethods("method")
|
||||||
|
.inputEncoding("encoding")
|
||||||
|
.jvmArgs("-XX:+UnlogregckDiagnosticVMOptions")
|
||||||
|
.jvmPath("path")
|
||||||
|
.maxMutationsPerClass(3)
|
||||||
|
.maxSurviving(1)
|
||||||
|
.mutableCodePaths("codePaths")
|
||||||
|
.mutationEngine("engine")
|
||||||
|
.mutationThreshold(0)
|
||||||
|
.mutationUnitSize(1)
|
||||||
|
.mutators(List.of(FOO, BAR))
|
||||||
|
.outputEncoding("encoding")
|
||||||
|
.outputFormats("json")
|
||||||
|
.pluginConfiguration("key", "value")
|
||||||
|
.projectBase("base")
|
||||||
|
.reportDir("dir")
|
||||||
|
.skipFailingTests(true)
|
||||||
|
.targetClasses("class")
|
||||||
|
.targetTests("test")
|
||||||
|
.testStrengthThreshold(0)
|
||||||
|
.threads(0)
|
||||||
|
.timeoutConst(0)
|
||||||
|
.timeoutFactor(0)
|
||||||
|
.timestampedReports(true)
|
||||||
|
.useClasspathJar(true)
|
||||||
|
.verbose(true)
|
||||||
|
.verbosity("default")
|
||||||
|
.executeConstructProcessCommandList();
|
||||||
|
|
||||||
|
try (var softly = new AutoCloseableSoftAssertions()) {
|
||||||
|
for (var p : args) {
|
||||||
|
var found = false;
|
||||||
|
for (var a : params) {
|
||||||
|
if (a.startsWith(p)) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
softly.assertThat(found).as(p + " not found.").isTrue();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -62,12 +145,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.classPath(FOO, BAR);
|
.classPath(FOO, BAR);
|
||||||
assertThat(op.options.get("--classPath")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--classPath")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.classPath(List.of(FOO, BAR));
|
.classPath(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--classPath")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--classPath")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -75,7 +158,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.classPathFile(FOO);
|
.classPathFile(FOO);
|
||||||
assertThat(op.options.get("--classPathFile")).isEqualTo(FOO);
|
assertThat(op.options().get("--classPathFile")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -83,12 +166,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.coverageThreshold(3);
|
.coverageThreshold(3);
|
||||||
assertThat(op.options.get("--coverageThreshold")).isEqualTo("3");
|
assertThat(op.options().get("--coverageThreshold")).isEqualTo("3");
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.coverageThreshold(101);
|
.coverageThreshold(101);
|
||||||
assertThat(op.options.get("--coverageThreshold")).isNull();
|
assertThat(op.options().get("--coverageThreshold")).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -96,12 +179,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.detectInlinedCode(true);
|
.detectInlinedCode(true);
|
||||||
assertThat(op.options.get("--detectInlinedCode")).isEqualTo(TRUE);
|
assertThat(op.options().get("--detectInlinedCode")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.detectInlinedCode(false);
|
.detectInlinedCode(false);
|
||||||
assertThat(op.options.get("--detectInlinedCode")).isEqualTo(FALSE);
|
assertThat(op.options().get("--detectInlinedCode")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -109,12 +192,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedClasses(FOO, BAR);
|
.excludedClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedClasses(Set.of(FOO, BAR));
|
.excludedClasses(Set.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedClasses")).as("as set").contains(FOO).contains(BAR).contains(",");
|
assertThat(op.options().get("--excludedClasses")).as("as set").contains(FOO).contains(BAR).contains(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -122,12 +205,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedGroups(FOO, BAR);
|
.excludedGroups(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedGroups")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedGroups")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedGroups(List.of(FOO, BAR));
|
.excludedGroups(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -135,30 +218,38 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedMethods(FOO, BAR);
|
.excludedMethods(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedMethods")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedMethods")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedMethods(List.of(FOO, BAR));
|
.excludedMethods(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void excludedRunners() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new BaseProject())
|
||||||
|
.excludedRunners(FOO);
|
||||||
|
assertThat(op.options().get("--excludedRunners")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void excludedTests() {
|
void excludedTests() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedTests(FOO, BAR);
|
.excludedTestClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedTests")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedTestClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedTests(List.of(FOO, BAR));
|
.excludedTestClasses(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedTests")).as("as list").isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedTestClasses")).as("as list").isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void execute() throws IOException {
|
void execute() throws IOException {
|
||||||
var tmpDir = Files.createTempDirectory("bld-pitest");
|
var tmpDir = Files.createTempDirectory("bld-pitest-");
|
||||||
tmpDir.toFile().deleteOnExit();
|
tmpDir.toFile().deleteOnExit();
|
||||||
var op = new PitestOperation().
|
var op = new PitestOperation().
|
||||||
fromProject(new WebProject())
|
fromProject(new WebProject())
|
||||||
|
@ -207,17 +298,23 @@ class PitestOperationTest {
|
||||||
"--sourceDirs c:\\myProject\\src");
|
"--sourceDirs c:\\myProject\\src");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void executeNoProject() {
|
||||||
|
var op = new PitestOperation();
|
||||||
|
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void exportLineCoverage() {
|
void exportLineCoverage() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.exportLineCoverage(true);
|
.exportLineCoverage(true);
|
||||||
assertThat(op.options.get("--exportLineCoverage")).isEqualTo(TRUE);
|
assertThat(op.options().get("--exportLineCoverage")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.exportLineCoverage(false);
|
.exportLineCoverage(false);
|
||||||
assertThat(op.options.get("--exportLineCoverage")).isEqualTo(FALSE);
|
assertThat(op.options().get("--exportLineCoverage")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -225,12 +322,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.failWhenNoMutations(true);
|
.failWhenNoMutations(true);
|
||||||
assertThat(op.options.get("--failWhenNoMutations")).isEqualTo(TRUE);
|
assertThat(op.options().get("--failWhenNoMutations")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.failWhenNoMutations(false);
|
.failWhenNoMutations(false);
|
||||||
assertThat(op.options.get("--failWhenNoMutations")).isEqualTo(FALSE);
|
assertThat(op.options().get("--failWhenNoMutations")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -238,12 +335,20 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.features(FOO, BAR);
|
.features(FOO, BAR);
|
||||||
assertThat(op.options.get("--features")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--features")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.features(List.of(FOO, BAR));
|
.features(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void fullMutationMatrix() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new BaseProject())
|
||||||
|
.fullMutationMatrix(true);
|
||||||
|
assertThat(op.options().get("--fullMutationMatrix")).isEqualTo(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -251,7 +356,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.historyInputLocation(FOO);
|
.historyInputLocation(FOO);
|
||||||
assertThat(op.options.get("--historyInputLocation")).isEqualTo(FOO);
|
assertThat(op.options().get("--historyInputLocation")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -259,7 +364,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.historyOutputLocation(FOO);
|
.historyOutputLocation(FOO);
|
||||||
assertThat(op.options.get("--historyOutputLocation")).isEqualTo(FOO);
|
assertThat(op.options().get("--historyOutputLocation")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -267,12 +372,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.includeLaunchClasspath(true);
|
.includeLaunchClasspath(true);
|
||||||
assertThat(op.options.get("--includeLaunchClasspath")).isEqualTo(TRUE);
|
assertThat(op.options().get("--includeLaunchClasspath")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.includeLaunchClasspath(false);
|
.includeLaunchClasspath(false);
|
||||||
assertThat(op.options.get("--includeLaunchClasspath")).isEqualTo(FALSE);
|
assertThat(op.options().get("--includeLaunchClasspath")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -280,12 +385,28 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.includedGroups(FOO, BAR);
|
.includedGroups(FOO, BAR);
|
||||||
assertThat(op.options.get("--includedGroups")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--includedGroups")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.includedGroups(List.of(FOO, BAR));
|
.includedGroups(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void includedTestMethods() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.includedTestMethods(FOO);
|
||||||
|
assertThat(op.options().get("--includedTestMethods")).isEqualTo(FOO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void inputEncoding() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new BaseProject())
|
||||||
|
.inputEncoding(FOO);
|
||||||
|
assertThat(op.options().get("--inputEncoding")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -293,12 +414,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.jvmArgs(FOO, BAR);
|
.jvmArgs(FOO, BAR);
|
||||||
assertThat(op.options.get("--jvmArgs")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--jvmArgs")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.jvmArgs(List.of(FOO, BAR));
|
.jvmArgs(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--jvmArgs")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--jvmArgs")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -306,7 +427,23 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.jvmPath(FOO);
|
.jvmPath(FOO);
|
||||||
assertThat(op.options.get("--jvmPath")).isEqualTo(FOO);
|
assertThat(op.options().get("--jvmPath")).isEqualTo(FOO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void maxMutationsPerClass() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new BaseProject())
|
||||||
|
.maxMutationsPerClass(12);
|
||||||
|
assertThat(op.options().get("--maxMutationsPerClass")).isEqualTo("12");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void maxSurviving() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.maxSurviving(1);
|
||||||
|
assertThat(op.options().get("--maxSurviving")).isEqualTo("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -314,12 +451,20 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutableCodePaths(FOO, BAR);
|
.mutableCodePaths(FOO, BAR);
|
||||||
assertThat(op.options.get("--mutableCodePaths")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutableCodePaths")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutableCodePaths(List.of(FOO, BAR));
|
.mutableCodePaths(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void mutationEngine() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.mutationEngine(FOO);
|
||||||
|
assertThat(op.options().get("--mutationEngine")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -327,12 +472,20 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutationThreshold(3);
|
.mutationThreshold(3);
|
||||||
assertThat(op.options.get("--mutationThreshold")).isEqualTo("3");
|
assertThat(op.options().get("--mutationThreshold")).isEqualTo("3");
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutationThreshold(101);
|
.mutationThreshold(101);
|
||||||
assertThat(op.options.get("--mutationThreshold")).isNull();
|
assertThat(op.options().get("--mutationThreshold")).isNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void mutationUnitSize() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.mutationUnitSize(2);
|
||||||
|
assertThat(op.options().get("--mutationUnitSize")).isEqualTo("2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -340,12 +493,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutators(FOO, BAR);
|
.mutators(FOO, BAR);
|
||||||
assertThat(op.options.get("--mutators")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutators")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutators(List.of(FOO, BAR));
|
.mutators(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--mutators")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutators")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -353,7 +506,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.outputEncoding(FOO);
|
.outputEncoding(FOO);
|
||||||
assertThat(op.options.get("--outputEncoding")).isEqualTo(FOO);
|
assertThat(op.options().get("--outputEncoding")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -361,12 +514,28 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.outputFormats(FOO, BAR);
|
.outputFormats(FOO, BAR);
|
||||||
assertThat(op.options.get("--outputFormats")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--outputFormats")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.outputFormats(List.of(FOO, BAR));
|
.outputFormats(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void pluginConfiguration() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.pluginConfiguration(FOO, BAR);
|
||||||
|
assertThat(op.options().get("--pluginConfiguration")).isEqualTo(FOO + "=" + BAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void projectBase() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.projectBase(FOO);
|
||||||
|
assertThat(op.options().get("--projectBase")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -374,7 +543,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.reportDir(FOO);
|
.reportDir(FOO);
|
||||||
assertThat(op.options.get("--reportDir")).isEqualTo(FOO);
|
assertThat(op.options().get("--reportDir")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -382,12 +551,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.skipFailingTests(true);
|
.skipFailingTests(true);
|
||||||
assertThat(op.options.get("--skipFailingTests")).isEqualTo(TRUE);
|
assertThat(op.options().get("--skipFailingTests")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.skipFailingTests(false);
|
.skipFailingTests(false);
|
||||||
assertThat(op.options.get("--skipFailingTests")).isEqualTo(FALSE);
|
assertThat(op.options().get("--skipFailingTests")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -395,12 +564,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.sourceDirs(FOO, BAR);
|
.sourceDirs(FOO, BAR);
|
||||||
assertThat(op.options.get(SOURCE_DIRS)).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--sourceDirs")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.sourceDirs(List.of(FOO, BAR));
|
.sourceDirs(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get(SOURCE_DIRS)).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--sourceDirs")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -408,12 +577,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.targetClasses(FOO, BAR);
|
.targetClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--targetClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.targetClasses(List.of(FOO, BAR));
|
.targetClasses(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--targetClasses")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetClasses")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -421,12 +590,189 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.targetTests(FOO, BAR);
|
.targetTests(FOO, BAR);
|
||||||
assertThat(op.options.get("--targetTests")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetTests")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.targetTests(List.of(FOO, BAR));
|
.targetTests(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testClassPath() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var bar = new File(BAR);
|
||||||
|
|
||||||
|
var foobar = String.format("%s,%s", FOO, BAR);
|
||||||
|
var op = new PitestOperation().classPath(FOO, BAR);
|
||||||
|
assertThat(op.options().get("--classPath")).as("String...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().classPath(List.of(FOO, BAR));
|
||||||
|
assertThat(op.options().get("--classPath")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
foobar = String.format("%s,%s", foo.getAbsolutePath(), bar.getAbsolutePath());
|
||||||
|
op = new PitestOperation().classPath(foo, bar);
|
||||||
|
assertThat(op.options().get("--classPath")).as("File...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().classPathFiles(List.of(foo, bar));
|
||||||
|
assertThat(op.options().get("--classPath")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().classPath(foo.toPath(), bar.toPath());
|
||||||
|
assertThat(op.options().get("--classPath")).as("Path...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().classPathPaths(List.of(foo.toPath(), bar.toPath()));
|
||||||
|
assertThat(op.options().get("--classPath")).as("List(Path...)").isEqualTo(foobar);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testHistoryInputLocation() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var op = new PitestOperation().historyInputLocation(FOO);
|
||||||
|
assertThat(op.options().get("--historyInputLocation")).as("as string").isEqualTo(FOO);
|
||||||
|
|
||||||
|
op = new PitestOperation().historyInputLocation(foo);
|
||||||
|
assertThat(op.options().get("--historyInputLocation")).as("as file").isEqualTo(foo.getAbsolutePath());
|
||||||
|
|
||||||
|
op = new PitestOperation().historyInputLocation(foo.toPath());
|
||||||
|
assertThat(op.options().get("--historyInputLocation")).as("as path").isEqualTo(foo.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testHistoryOutputLocation() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var op = new PitestOperation().historyOutputLocation(FOO);
|
||||||
|
assertThat(op.options().get("--historyOutputLocation")).as("as string").isEqualTo(FOO);
|
||||||
|
|
||||||
|
op = new PitestOperation().historyOutputLocation(foo);
|
||||||
|
assertThat(op.options().get("--historyOutputLocation")).as("as file").isEqualTo(foo.getAbsolutePath());
|
||||||
|
|
||||||
|
op = new PitestOperation().historyOutputLocation(foo.toPath());
|
||||||
|
assertThat(op.options().get("--historyOutputLocation")).as("as path").isEqualTo(foo.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testJvmPath() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var op = new PitestOperation().jvmPath(FOO);
|
||||||
|
assertThat(op.options().get("--jvmPath")).as("as string").isEqualTo(FOO);
|
||||||
|
|
||||||
|
op = new PitestOperation().jvmPath(foo);
|
||||||
|
assertThat(op.options().get("--jvmPath")).as("as file").isEqualTo(foo.getAbsolutePath());
|
||||||
|
|
||||||
|
op = new PitestOperation().jvmPath(foo.toPath());
|
||||||
|
assertThat(op.options().get("--jvmPath")).as("as path").isEqualTo(foo.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testMutableCodePaths() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var bar = new File(BAR);
|
||||||
|
|
||||||
|
var foobar = String.format("%s,%s", FOO, BAR);
|
||||||
|
var op = new PitestOperation().mutableCodePaths(FOO, BAR);
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("String...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().mutableCodePaths(List.of(FOO, BAR));
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
foobar = String.format("%s,%s", foo.getAbsolutePath(), bar.getAbsolutePath());
|
||||||
|
op = new PitestOperation().mutableCodePaths(foo, bar);
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("File...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().mutableCodePathsFiles(List.of(foo, bar));
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().mutableCodePaths(foo.toPath(), bar.toPath());
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("Path...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().mutableCodePathsPaths(List.of(foo.toPath(), bar.toPath()));
|
||||||
|
assertThat(op.options().get("--mutableCodePaths")).as("List(Path...)").isEqualTo(foobar);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testOutputFormats() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var bar = new File(BAR);
|
||||||
|
|
||||||
|
var foobar = String.format("%s,%s", FOO, BAR);
|
||||||
|
var op = new PitestOperation().outputFormats(FOO, BAR);
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("String...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().outputFormats(List.of(FOO, BAR));
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
foobar = String.format("%s,%s", foo.getAbsolutePath(), bar.getAbsolutePath());
|
||||||
|
op = new PitestOperation().outputFormats(foo, bar);
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("File...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().outputFormatsFiles(List.of(foo, bar));
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().outputFormats(foo.toPath(), bar.toPath());
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("Path...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().outputFormatsPaths(List.of(foo.toPath(), bar.toPath()));
|
||||||
|
assertThat(op.options().get("--outputFormats")).as("List(Path...)").isEqualTo(foobar);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testProjectBase() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var op = new PitestOperation().projectBase(FOO);
|
||||||
|
assertThat(op.options().get("--projectBase")).as("as string").isEqualTo(FOO);
|
||||||
|
|
||||||
|
op = new PitestOperation().projectBase(foo);
|
||||||
|
assertThat(op.options().get("--projectBase")).as("as file").isEqualTo(foo.getAbsolutePath());
|
||||||
|
|
||||||
|
op = new PitestOperation().projectBase(foo.toPath());
|
||||||
|
assertThat(op.options().get("--projectBase")).as("as path").isEqualTo(foo.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testReportDir() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var op = new PitestOperation().reportDir(FOO);
|
||||||
|
assertThat(op.options().get("--reportDir")).as("as string").isEqualTo(FOO);
|
||||||
|
|
||||||
|
op = new PitestOperation().reportDir(foo);
|
||||||
|
assertThat(op.options().get("--reportDir")).as("as file").isEqualTo(foo.getAbsolutePath());
|
||||||
|
|
||||||
|
op = new PitestOperation().reportDir(foo.toPath());
|
||||||
|
assertThat(op.options().get("--reportDir")).as("as path").isEqualTo(foo.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testSourceDirs() {
|
||||||
|
var foo = new File(FOO);
|
||||||
|
var bar = new File(BAR);
|
||||||
|
|
||||||
|
var foobar = String.format("%s,%s", FOO, BAR);
|
||||||
|
var op = new PitestOperation().sourceDirs(FOO, BAR);
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("String...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().sourceDirs(List.of(FOO, BAR));
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
foobar = String.format("%s,%s", foo.getAbsolutePath(), bar.getAbsolutePath());
|
||||||
|
op = new PitestOperation().sourceDirs(foo, bar);
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("File...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().sourceDirsFiles(List.of(foo, bar));
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("List(String...)").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().sourceDirs(foo.toPath(), bar.toPath());
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("Path...").isEqualTo(foobar);
|
||||||
|
|
||||||
|
op = new PitestOperation().sourceDirsPaths(List.of(foo.toPath(), bar.toPath()));
|
||||||
|
assertThat(op.options().get("--sourceDirs")).as("List(Path...)").isEqualTo(foobar);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testStrengthThreshold() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.testStrengthThreshold(6);
|
||||||
|
assertThat(op.options().get("--testStrengthThreshold")).isEqualTo("6");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -434,7 +780,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.threads(3);
|
.threads(3);
|
||||||
assertThat(op.options.get("--threads")).isEqualTo("3");
|
assertThat(op.options().get("--threads")).isEqualTo("3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -442,7 +788,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timeoutConst(300);
|
.timeoutConst(300);
|
||||||
assertThat(op.options.get("--timeoutConst")).isEqualTo("300");
|
assertThat(op.options().get("--timeoutConst")).isEqualTo("300");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -450,7 +796,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timeoutFactor(5.25);
|
.timeoutFactor(5.25);
|
||||||
assertThat(op.options.get("--timeoutFactor")).isEqualTo("5.25");
|
assertThat(op.options().get("--timeoutFactor")).isEqualTo("5.25");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -458,12 +804,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timestampedReports(true);
|
.timestampedReports(true);
|
||||||
assertThat(op.options.get("--timestampedReports")).isEqualTo(TRUE);
|
assertThat(op.options().get("--timestampedReports")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.timestampedReports(false);
|
.timestampedReports(false);
|
||||||
assertThat(op.options.get("--timestampedReports")).isEqualTo(FALSE);
|
assertThat(op.options().get("--timestampedReports")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -471,12 +817,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.useClasspathJar(true);
|
.useClasspathJar(true);
|
||||||
assertThat(op.options.get("--useClasspathJar")).isEqualTo(TRUE);
|
assertThat(op.options().get("--useClasspathJar")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.useClasspathJar(false);
|
.useClasspathJar(false);
|
||||||
assertThat(op.options.get("--useClasspathJar")).isEqualTo(FALSE);
|
assertThat(op.options().get("--useClasspathJar")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -484,11 +830,19 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.verbose(true);
|
.verbose(true);
|
||||||
assertThat(op.options.get("--verbose")).isEqualTo(TRUE);
|
assertThat(op.options().get("--verbose")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.verbose(false);
|
.verbose(false);
|
||||||
assertThat(op.options.get("--verbose")).isEqualTo(FALSE);
|
assertThat(op.options().get("--verbose")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Test
|
||||||
|
void verbosity() {
|
||||||
|
var op = new PitestOperation()
|
||||||
|
.fromProject(new Project())
|
||||||
|
.verbosity(FOO);
|
||||||
|
assertThat(op.options().get("--verbosity")).isEqualTo(FOO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
48
src/test/resources/pitest-args.txt
Normal file
48
src/test/resources/pitest-args.txt
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
--argLine
|
||||||
|
--avoidCallsTo
|
||||||
|
--classPath
|
||||||
|
--classPathFile
|
||||||
|
--coverageThreshold
|
||||||
|
--detectInlinedCode
|
||||||
|
--dryRun
|
||||||
|
--excludedClasses
|
||||||
|
--excludedGroups
|
||||||
|
--excludedMethods
|
||||||
|
--excludedRunners
|
||||||
|
--excludedTestClasses
|
||||||
|
--exportLineCoverage
|
||||||
|
--failWhenNoMutations
|
||||||
|
--features
|
||||||
|
--fullMutationMatrix
|
||||||
|
--historyInputLocation
|
||||||
|
--historyOutputLocation
|
||||||
|
--includedGroups
|
||||||
|
--includedTestMethods
|
||||||
|
--includeLaunchClasspath
|
||||||
|
--inputEncoding
|
||||||
|
--jvmArgs
|
||||||
|
--jvmPath
|
||||||
|
--maxMutationsPerClass
|
||||||
|
--maxSurviving
|
||||||
|
--mutableCodePaths
|
||||||
|
--mutationEngine
|
||||||
|
--mutationThreshold
|
||||||
|
--mutationUnitSize
|
||||||
|
--mutators
|
||||||
|
--outputEncoding
|
||||||
|
--outputFormats
|
||||||
|
--pluginConfiguration
|
||||||
|
--projectBase
|
||||||
|
--reportDir
|
||||||
|
--skipFailingTests
|
||||||
|
--sourceDirs
|
||||||
|
--targetClasses
|
||||||
|
--targetTests
|
||||||
|
--testStrengthThreshold
|
||||||
|
--threads
|
||||||
|
--timeoutConst
|
||||||
|
--timeoutFactor
|
||||||
|
--timestampedReports
|
||||||
|
--useClasspathJar
|
||||||
|
--verbose
|
||||||
|
--verbosity
|
Loading…
Add table
Add a link
Reference in a new issue