Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing github action #1

Open
wants to merge 103 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
26ca06e
Created PaperSizeTest.java
lauracadillo Sep 23, 2024
0d32e46
ajout de 4 tests
lauracadillo Sep 25, 2024
8e8949b
Update README.md
lauracadillo Oct 1, 2024
629395a
test line interpolator
lauracadillo Oct 1, 2024
5371d6f
Merge branch 'master' of https://github.com/lauracadillo/Makelangelo-…
lauracadillo Oct 1, 2024
daca553
test NameThatColor and RangeSlider
lauracadillo Oct 1, 2024
8334bec
Test TextInterfaceToListeners
ooohhheven Oct 1, 2024
2a97ab2
Test TextInterfaceToListeners
ooohhheven Oct 1, 2024
113bc01
FilterLevelsTest
lauracadillo Oct 1, 2024
ab3a438
Merge branch 'master' of https://github.com/lauracadillo/Makelangelo-…
lauracadillo Oct 1, 2024
054887a
collapsible panel test
lauracadillo Oct 2, 2024
b0a828e
update collapsible panel test
lauracadillo Oct 2, 2024
6d74582
Revert "update collapsible panel test"
lauracadillo Oct 2, 2024
3dcfe22
Revert "collapsible panel test"
lauracadillo Oct 2, 2024
1db9b4b
added comments to RangeSliderTest.java
lauracadillo Oct 2, 2024
189710d
update comments FilterLevelsTest.java
lauracadillo Oct 2, 2024
4e7f89a
added collapsiblePanelTest
lauracadillo Oct 3, 2024
33560e6
update collapsiblepaneltest
lauracadillo Oct 3, 2024
f519dda
Revert "update collapsiblepaneltest"
lauracadillo Oct 3, 2024
9665426
Revert "added collapsiblePanelTest"
lauracadillo Oct 3, 2024
0995dfb
Create SelectSpinnerTest.java
lauracadillo Oct 3, 2024
38d999d
replaced filterLevelsTest w MarlnSimulationTest
lauracadillo Oct 3, 2024
7276757
fixed issue wwith marlinSimulation ?
lauracadillo Oct 3, 2024
ab1ff10
Revert "fixed issue wwith marlinSimulation ?"
lauracadillo Oct 3, 2024
ab3e5ab
Revert "replaced filterLevelsTest w MarlnSimulationTest"
lauracadillo Oct 3, 2024
3fb7884
added flipturtleactiontest
lauracadillo Oct 3, 2024
490e082
added selectpasswordTest
lauracadillo Oct 3, 2024
53bd1f6
Update SelectPasswordTest.java
lauracadillo Oct 3, 2024
0e3677e
deleted selectPasswordTest, modified RangeSliderTest
lauracadillo Oct 3, 2024
1c17e56
Revert "added flipturtleactiontest"
lauracadillo Oct 3, 2024
04cd3ea
Revert "added selectpasswordTest"
lauracadillo Oct 3, 2024
2ff1d87
Revert "deleted selectPasswordTest, modified RangeSliderTest"
lauracadillo Oct 3, 2024
4f5cab9
Revert "Update SelectPasswordTest.java"
lauracadillo Oct 3, 2024
d21abae
Revert "added selectpasswordTest"
lauracadillo Oct 3, 2024
8a8d581
modified FilterLevelsTest
lauracadillo Oct 3, 2024
73e4385
Update FilterLevelsTest.java
lauracadillo Oct 3, 2024
3709bfe
Revert "Update FilterLevelsTest.java"
lauracadillo Oct 3, 2024
4c40fac
Revert "modified FilterLevelsTest"
lauracadillo Oct 3, 2024
cf4d8f4
deleted filterlevelstest added cartesianbuttonstest
lauracadillo Oct 3, 2024
9eb99a8
Update CartesianButtonsTest.java
lauracadillo Oct 3, 2024
62bcc93
added selectFieldTest
lauracadillo Oct 4, 2024
d4a341e
modified module info
lauracadillo Oct 4, 2024
b04e074
modified module info x2
lauracadillo Oct 4, 2024
d9e1491
Create SelectPasswordTest.java
lauracadillo Oct 4, 2024
a2b73c9
deleted not useful tests
lauracadillo Oct 4, 2024
89cfcc4
deleted selectSpinnerTest.java
lauracadillo Oct 4, 2024
4eef8ab
Create documentation-tests.html
lauracadillo Oct 4, 2024
84956f8
Update documentation-tests.html
lauracadillo Oct 4, 2024
8bb8785
TestActionCommandDialog and documentation-tests.html
ooohhheven Oct 7, 2024
cea11b7
TestActionCommandDialog and documentation-tests.html
ooohhheven Oct 7, 2024
ec74aa0
TestActionCommandDialog and documentation-tests.html
ooohhheven Oct 7, 2024
4fd953a
TestActionCommandDialog et documentation-tests.html
ooohhheven Oct 7, 2024
8a10a86
TestRun
ooohhheven Oct 7, 2024
9b78ae2
TestStringHelper
ooohhheven Oct 7, 2024
1041614
TestStringHelper
ooohhheven Oct 8, 2024
d501a18
commentaires
ooohhheven Oct 8, 2024
464f62f
testColorHSB
ooohhheven Oct 8, 2024
655aca3
commentaires de testColorHSB
ooohhheven Oct 8, 2024
b37f8ff
documentation et TestStringHelper
ooohhheven Oct 8, 2024
b3a5fb0
small change documentation
ooohhheven Oct 8, 2024
2a83881
color change documentation
ooohhheven Oct 8, 2024
2f37416
color text change documentation
ooohhheven Oct 8, 2024
c344d93
text change documentation
ooohhheven Oct 8, 2024
067a7ba
text size changes documentation
ooohhheven Oct 8, 2024
89f12fd
ajout des commentaires dans les tests
lauracadillo Oct 8, 2024
fd1c763
added links to documentation
lauracadillo Oct 8, 2024
a48a11a
Update documentation-tests.html
lauracadillo Oct 10, 2024
d4b1d28
links changes
ooohhheven Oct 10, 2024
bdd99ba
link change
ooohhheven Oct 10, 2024
68d5e12
link change1
ooohhheven Oct 10, 2024
d037381
link change2
ooohhheven Oct 10, 2024
be3cd94
Revert "link change2"
lauracadillo Oct 10, 2024
65bfd82
Revert "link change1"
lauracadillo Oct 10, 2024
ea15264
Revert "link change"
lauracadillo Oct 10, 2024
4a82372
Revert "links changes"
lauracadillo Oct 10, 2024
0d4c917
Update documentation-tests.html
lauracadillo Oct 10, 2024
73e15f4
Update documentation-tests.html
lauracadillo Oct 10, 2024
78754f6
Update documentation-tests.html
lauracadillo Oct 10, 2024
0596677
1st modification test
lauracadillo Nov 5, 2024
07fe9b7
minHeap test2
lauracadillo Nov 5, 2024
8e42340
minHeapFreeRatio test2
lauracadillo Nov 5, 2024
40760a6
minHeapFreeRatio test matrix
lauracadillo Nov 5, 2024
c2a738c
max heap free ratio test
lauracadillo Nov 5, 2024
02675c8
modification max et min
lauracadillo Nov 5, 2024
cccc00f
min max final
lauracadillo Nov 5, 2024
5cc447e
max ram percentage test
lauracadillo Nov 5, 2024
402ad89
changed format
lauracadillo Nov 5, 2024
2e7061c
added 2 last test
lauracadillo Nov 5, 2024
544fe3a
print compilation
lauracadillo Nov 5, 2024
39c4319
UseStringDeduplication
lauracadillo Nov 5, 2024
b6c951d
added documentation-changements
lauracadillo Nov 9, 2024
c399ac6
texte
ooohhheven Nov 11, 2024
7a04847
add flag
ooohhheven Nov 11, 2024
79a2319
ThreadStackSize text
ooohhheven Nov 11, 2024
ceeb6cb
UseParallelGC text
ooohhheven Nov 11, 2024
dd1c822
UseStringDeduplication text
ooohhheven Nov 12, 2024
8d82e6a
delete a flag
JdJ1n Nov 12, 2024
27ccbe0
humeur
lauracadillo Nov 12, 2024
5e4deb9
add flag
JdJ1n Nov 13, 2024
e06c2cc
add glag
JdJ1n Nov 13, 2024
012e513
Merge remote-tracking branch 'origin/master'
JdJ1n Nov 13, 2024
b415660
delete flag
JdJ1n Nov 13, 2024
0cd7b27
delete glag
JdJ1n Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ on:
push:
pull_request:


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
flag:
- { name: "MinHeapFreeRatio", value: "50" }
- { name: "PrintCompilation", value: "true"}
- { name: "UseParallelGC", value: "true" }
- { name: "UseStringDeduplication", value: "true" }
- { name: "ThreadStackSize", value: "1024" }

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -36,3 +46,5 @@ jobs:
else
echo "New coverage: $coverage%. Coverage is improved!"
fi


Binary file added .lolcommits/Makelangelo-software/5e4deb98000.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .lolcommits/Makelangelo-software/b4156605991.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .lolcommits/Makelangelo-software/e06c2cc5f7d.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
![workflow](https://github.com/MarginallyClever/Makelangelo-software/actions/workflows/maven.yml/badge.svg)
[![Crowdin](https://badges.crowdin.net/makelangelo-software/localized.svg)](https://crowdin.com/project/makelangelo-software)


Makelangelo Software is a Java program that prepares art for CNC plotters. It was originally designed for the
[Makelangelo Art Robot](http://www.makelangelo.com/). It runs in Windows, OSX, and several flavors of linux.

Expand Down
6 changes: 3 additions & 3 deletions config/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def computeCoverage(fileList):
covered = 0
missedBranches = 0
coveredBranches = 0

for filename in fileList:
try:
with open(filename, newline='') as csvfile:
Expand All @@ -23,7 +23,7 @@ def computeCoverage(fileList):
except Exception as e:
print(f"Error processing file {filename}: {str(e)}")
return (0, 0)

return (
calculatePercentage(covered, missed),
calculatePercentage(coveredBranches, missedBranches)
Expand All @@ -44,4 +44,4 @@ def main(jacocoCsvFile):
import sys
jacocoCsvFile = sys.argv[1]
result = main(jacocoCsvFile)
print(result)
print(result)
140 changes: 140 additions & 0 deletions documentation-changements.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tests</title>
<style>
body {background-color: rgba(250, 248, 249, 0.68);}
h1 {color: rgb(0, 0, 0);
font-family: verdana;
font-size: 120%;
font-weight: bold;}
p {color: rgb(4, 4, 4);
font-family: verdana;
font-size: 100%;}

h2,a {color: rgb(125, 6, 113);
font-family: verdana;
font-size: 100%;}

ul,li{color: rgba(51, 25, 42, 0.98);
font-family: verdana;
font-size: 110%;}
</style>
</head>
<body>


<h1>Modifications</h1>


<h2> MinHeapRatio </h2>
<ul>
<p>
En augmentant la valeur du paramètre `minHeapFreeRatio`, nous
améliorons les performances du programme car cela réduit la
fréquence à laquelle le programme effectue la collecte de déchets.
Nous avons choisi cette option car, bien que l'utilisation de la
mémoire système augmente, nous pouvons vérifier que le programme
continue de s'exécuter de la même manière, avec de meilleures
performances.
</p>
</ul>


<h2> PrintCompilation</h2>
<ul>
<p>
Nous avons choisi d’activer l’option `PrintCompilation` afin de
pouvoir vérifier des paramètres de débogage, qui, bien que non
utilisés actuellement, nous aident à nous familiariser avec ces
termes. De plus, cette modification nous permet d'analyser les
performances du programme que nous exécutons.
</p>


</ul>


<h2> ThreadStackSize</h2>
<ul>
<p>La réduction de la taille de ThreadStackSize peut être utile pour
optimiser la gestion de la mémoire. Par exemple dans les
applications à forte concurrence, où un grand nombre de threads
sont créés, une taille de pile importante pour chaque thread peut
consommer une quantité excessive de mémoire. En réduisant la taille
de la pile, on économise de la mémoire pour chaque thread, ce qui
permet de gérer un plus grand nombre de threads simultanément sans
épuiser les ressources du système.</p>


</ul>


<h2> UseParallelGC</h2>

<ul>
<p>Changer la valeur par défaut de UseParallelGC de false à true a pour
but d’améliorer les performances des applications Java sur les
systèmes modernes. Le Garbage Collector parallèle (Parallel GC)
utilise plusieurs threads pour traiter la collecte de la mémoire
en parallèle, ce qui permet de réduire la durée des pauses dues
au garbage collection. Cela est particulièrement efficace pour
tirer parti des ressources CPU disponibles. Le Parallel GC est
conçu pour maximiser le débit de l’application, c’est-à-dire la
quantité de travail qu’elle peut traiter dans un laps de temps
donné. Ce changement vise à offrir de meilleures performances.
</p>

</ul>


<h2>UseStringDeduplication</h2>
<ul>
<p>En changeant la valeur de UseStringDeduplication par défaut de false
à true permet de réduire l’utilisation de la mémoire et d’améliorer
les performances globales en collaboration avec le G1 GC.
En dédupliquant ces chaînes, le JVM peut diminuer significativement
la consommation de mémoire. En remplaçant les chaînes de caractères
dupliquées par une seule instance partagée, UseStringDeduplication
réduit la fragmentation de la mémoire, ce qui permet une utilisation
plus efficace de la mémoire. Cela est particulièrement avantageux
pour les applications qui traitent de grandes quantités de données
textuelles.</p>

</ul>

<h2>Humeur:</h2>

<p>- Why did the Java developer stay calm during the crisis?
- Because he could handle exceptions! </p>
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣠⡀⢠⣤⡀⠄⣤⠄⠄⢠⣤⡀⢠⡄⣤⢠⡄⢠⡄⠄⣤⣤⣄⣠⣄⢀⣤⡀⣠⣤⠄⣠⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠙⠁⢸⣚⡧⣼⠼⡄⠄⢸⣇⡸⢸⣇⡿⢸⠱⢿⡇⠄⠄⡇⢸⣛⣶⢸⣛⡆⣛⣳⠄⠙⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⣀⣀⣀⠤⠤⢄⣀⣀⣀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣀⡠⠶⠖⠉⠁⠄⠄⠄⠄⠄⠄⠈⠉⠓⠶⣄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⡠⠴⠎⠁⠰⠆⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠘⡄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⡏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣷⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⢠⡄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸⠁⠄⠄⠄⡜⠳⢤⣤⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠛⠄⠄⣿⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⢸⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⡇⠄⠄⠄⠄⢱⠄⠄⠄⠉⠛⠢⠤⣤⣄⡀⠄⠄⠄⠄⠄⣴⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⢀⣀⣀⣀⣸⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢿⣤⠄⠄⠄⠄⢸⡇⠄⠄⠄⠄⡇⠄⠄⠄⠄⠄⠄⠄⠄⣠⠝⠄⠄⠄⠄⣴⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⣠⠞⠉⠁⠄⣠⢿⡟⠓⠦⣤⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⣧⠄⠄⠄⠄⠄⢣⠄⠄⠄⠄⢱⡄⠄⠄⠄⠄⠄⣠⠴⠋⠄⠄⠄⣤⠟⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⢇⠄⠄⠄⠈⠁⠄⠙⠂⠄⠄⠉⢳⠄⠄⠄⠄⠄⠄⠄⠄⠄⣷⠄⠄⠄⠄⠈⠉⠑⠶⠦⠤⠬⣍⣉⣉⣉⣉⣁⣀⠤⢴⠶⠊⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠘⠲⠦⠤⣀⣀⣀⣀⣀⣀⣀⣀⡼⠄⠄⠄⠄⠄⠄⠄⠄⠄⠸⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⢹⠁⠄⠄⠄⠘⣄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠈⡏⠉⠉⠉⠉⠉⠄⠄⠄⠄⠄⠄⢰⣲⠄⠄⠄⣷⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸⠄⠄⠄⠄⠄⠈⣷⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⠄⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠹⡀⠄⢠⠟⢆⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣀⡇⠄⠄⠄⠄⠄⠄⣽⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⢀⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢳⡀⠈⠒⠚⢤⣄⠄⠄⠄⠄⠄⢀⣠⡴⠊⢱⠃⠄⠄⡄⠄⠄⠄⢹⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⢸⡇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠻⡀⠄⠄⠄⠄⠉⠙⠛⠛⠋⠉⠄⠄⢀⡇⠄⣠⠟⠄⠄⠄⠄⢸⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⠄⠄⢸⠁⢀⣀⣀⣤⣤⠤⠤⠤⢤⣤⣀⠄⠄⠄⠄⠻⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸⢣⡜⠁⠄⠄⠄⠄⠄⣼⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⣠⠔⢺⠋⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠓⣤⠄⠄⠄⡏⠉⣿⠆⠄⠄⠄⠄⠄⠄⢀⣤⡞⠃⠄⠄⠄⠄⠄⠄⠄⡏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠈⡧⣀⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⣀⡤⠞⣿⠄⠄⠄⠛⠤⠜⠓⠦⠤⠤⠤⠔⠛⢁⡼⠃⠄⠄⠄⠄⠄⠄⠄⢀⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⡇⠈⡑⠶⠶⠦⠴⠶⠶⠒⡗⠒⢹⠉⠄⠄⣿⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣀⡴⠊⠁⠄⠄⠄⠄⠄⠄⠄⠄⢸⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⠄⠄⠄⢱⠄⡇⠄⠄⠄⠄⠄⠄⠄⣇⠄⠈⠄⠄⠄⡿⠄⠄⠄⠄⠄⠄⠄⠄⢀⡴⠞⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⡿⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄

</body>
</html>
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ It pairs really well with Marlin-polargraph, the code in the brain of the robot
</dependencyManagement>

<dependencies>


<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
opens com.marginallyclever.makelangelo.makeart.io;
opens com.marginallyclever.makelangelo.plotter.plottercontrols;
opens com.marginallyclever.makelangelo.turtle;
opens com.marginallyclever.makelangelo.select;

exports com.marginallyclever.communications;
exports com.marginallyclever.convenience.log to ch.qos.logback.core;
Expand All @@ -37,6 +38,7 @@
exports com.marginallyclever.makelangelo.paper;
exports com.marginallyclever.makelangelo.plotter.plottersettings;
exports com.marginallyclever.makelangelo.turtle;
exports com.marginallyclever.makelangelo.select;

exports com.marginallyclever.makelangelo.donatelloimpl to com.marginallyclever.nodegraphcore;
exports com.marginallyclever.makelangelo.donatelloimpl.nodes to com.marginallyclever.nodegraphcore;
Expand Down
52 changes: 52 additions & 0 deletions src/test/java/com/marginallyclever/convenience/ColorHSBTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.marginallyclever.convenience;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

public class ColorHSBTest {

/* Ce test vérifie le bon fonctionnement du constructeur et S'assure que l'initialisation se fait correctement.*/
@Test
public void testColorHSBConstructor() {
ColorHSB color = new ColorHSB(0.5f, 0.7f, 0.8f);

assertEquals(0.5f, color.getHue());
assertEquals(0.7f, color.getSaturation());
assertEquals(0.8f, color.getBrightness());
}

/* Ce test vérifie la méthode set() qui permet de changer les valeurs de hue,
* saturation, et brightness après l'initialisation.*/
@Test
public void testColorHSBSetMethod() {
ColorHSB color = new ColorHSB();
color.set(0.3f, 0.4f, 0.5f);

assertEquals(0.3f, color.getHue());
assertEquals(0.4f, color.getSaturation());
assertEquals(0.5f, color.getBrightness());
}

/* Ce test vérifie la méthode equals(), qui compare deux objets ColorHSB.*/
@Test
public void testColorHSBEqualsMethod() {
ColorHSB color1 = new ColorHSB(0.2f, 0.3f, 0.4f);
ColorHSB color2 = new ColorHSB(0.2f, 0.3f, 0.4f);
ColorHSB color3 = new ColorHSB(0.3f, 0.4f, 0.5f);

assertEquals(color1, color2);
assertNotEquals(color1, color3);
}

/* Ce test vérifie la méthode diff(), qui calcule la différence entre deux objets ColorHSB.*/
@Test
public void testColorHSBDiffMethod() {
ColorHSB color1 = new ColorHSB(0.2f, 0.3f, 0.4f);
ColorHSB color2 = new ColorHSB(0.3f, 0.4f, 0.5f);

float difference = color1.diff(color2);

assertEquals(0.17320508f, difference, 0.00001f); // Adjust delta for floating-point comparison
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.marginallyclever.convenience;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import java.awt.Color;

public class LineSegment2DTest {
@Test
public void testFlip() {
Point2D start = new Point2D(1.0, 2.0);
Point2D end = new Point2D(4.0, 6.0);
LineSegment2D segment = new LineSegment2D(start, end, Color.RED);

segment.flip();

assertEquals(start, segment.end);
assertEquals(end, segment.start);
}

}
43 changes: 43 additions & 0 deletions src/test/java/com/marginallyclever/convenience/Point2DTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.marginallyclever.convenience;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

public class Point2DTest {

@Test
public void testConstructorAndSetters() {
Point2D p = new Point2D(3.0, 4.0);
Point2D q = new Point2D(1.0, 2.0);


p.set(5.0, 6.0);
assertEquals(5.0, p.x, 0.001);
assertEquals(6.0, p.y, 0.001);

p.set(q);
assertEquals(1.0, p.x, 0.001);
assertEquals(2.0, p.y, 0.001);
}

@Test
public void testScale() {
Point2D p = new Point2D(1.0, 2.0);

p.scale(2.0);

assertEquals(2.0, p.x, 0.001);
assertEquals(4.0, p.y, 0.001);
}

@Test
public void testAdd() {
Point2D p = new Point2D(1.0, 2.0);
Point2D q = new Point2D(3.0, 4.0);

p.add(q);

assertEquals(4.0, p.x, 0.001);
assertEquals(6.0, p.y, 0.001);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.marginallyclever.convenience;

import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TestLineInterpolator {

private LineInterpolator line;
private Point2D start;
private Point2D end;

@BeforeEach
public void setUp() {
start = new Point2D(0, 0);
end = new Point2D(10, 10);
line = new LineInterpolator(start, end);
}


@Test
public void testSetStart() {
Point2D newStart = new Point2D(2, 2);
line.setStart(newStart);
assertEquals(newStart, line.getStart(), "El punto de inicio debería ser el asignado");
}

@Test
public void testSetEnd() {
Point2D newEnd = new Point2D(8, 8);
line.setEnd(newEnd);
assertEquals(newEnd, line.getEnd(), "El punto final debería ser el asignado");
}

}

Loading