From 779692e8446ec15f6889931d7ae63f1fb242b8d4 Mon Sep 17 00:00:00 2001 From: tryuan99 Date: Fri, 3 Jan 2025 23:52:54 +0000 Subject: [PATCH] deploy: 8c95490124b0990c90ba968c20d6562bd97cbda0 --- coverage/editmode/Report/Summary.json | 28 +- coverage/editmode/Report/Summary.md | 28 +- coverage/editmode/Report/Summary.xml | 28 +- coverage/editmode/Report/badge_combined.svg | 2 +- .../editmode/Report/badge_linecoverage.svg | 2 +- .../badge_shieldsio_linecoverage_blue.svg | 2 +- ...dge_shieldsio_linecoverage_brightgreen.svg | 2 +- .../badge_shieldsio_linecoverage_green.svg | 2 +- ...badge_shieldsio_linecoverage_lightgrey.svg | 2 +- .../badge_shieldsio_linecoverage_orange.svg | 2 +- .../badge_shieldsio_linecoverage_red.svg | 2 +- .../badge_shieldsio_linecoverage_yellow.svg | 2 +- ...dge_shieldsio_linecoverage_yellowgreen.svg | 2 +- .../Report/bamlab.micromissiles_Agent.html | 2 +- .../bamlab.micromissiles_ApnController.html | 2 +- .../bamlab.micromissiles_AttackBehavior.html | 2 +- ...bamlab.micromissiles_CameraController.html | 2 +- ...mlab.micromissiles_CarrierInterceptor.html | 2 +- .../Report/bamlab.micromissiles_Cluster.html | 189 + .../bamlab.micromissiles_ConfigLoader.html | 6 +- .../bamlab.micromissiles_Constants.html | 2 +- ...ab.micromissiles_DirectAttackBehavior.html | 2 +- .../bamlab.micromissiles_DummyAgent.html | 2 +- ...mlab.micromissiles_DynamicAgentConfig.html | 2 +- .../bamlab.micromissiles_FixedWingThreat.html | 2 +- .../bamlab.micromissiles_GenerateCone.html | 2 +- .../Report/bamlab.micromissiles_IADS.html | 2 +- .../bamlab.micromissiles_IAssignment.html | 2 +- .../bamlab.micromissiles_IController.html | 2 +- .../bamlab.micromissiles_IdealSensor.html | 2 +- .../bamlab.micromissiles_InputManager.html | 2 +- .../bamlab.micromissiles_Interceptor.html | 2 +- .../bamlab.micromissiles_ParticleManager.html | 2 +- .../bamlab.micromissiles_PnController.html | 2 +- ...micromissiles_RectTransformExtensions.html | 2 +- ...bamlab.micromissiles_RotaryWingThreat.html | 2 +- ...ab.micromissiles_RoundRobinAssignment.html | 2 +- .../Report/bamlab.micromissiles_Sensor.html | 2 +- .../bamlab.micromissiles_SimManager.html | 2 +- .../bamlab.micromissiles_SimMonitor.html | 2 +- ...bamlab.micromissiles_SimulationConfig.html | 2 +- ...amlab.micromissiles_StaticAgentConfig.html | 2 +- ...amlab.micromissiles_SwarmStatusDialog.html | 2 +- .../Report/bamlab.micromissiles_Threat.html | 2 +- ...bamlab.micromissiles_ThreatAssignment.html | 2 +- .../bamlab.micromissiles_ThreatData.html | 2 +- .../bamlab.micromissiles_UIBuildButton.html | 2 +- .../Report/bamlab.micromissiles_UIDialog.html | 2 +- ...bamlab.micromissiles_UIElementDragger.html | 2 +- ....micromissiles_UIElementMouseCapturer.html | 2 +- .../bamlab.micromissiles_UIHitMarker.html | 2 +- .../bamlab.micromissiles_UIManager.html | 2 +- ...amlab.micromissiles_UISelectableEntry.html | 2 +- .../Report/bamlab.micromissiles_UIWindow.html | 2 +- .../bamlab.micromissiles_Utilities.html | 2 +- .../Report/bamlab.micromissiles_Vessel.html | 2 +- ...mlab.micromissiles_WaypointController.html | 2 +- .../bamlab.test.editmode_ClusterTest.html | 204 + .../bamlab.test.editmode_SanityTest.html | 2 +- ...b.test.editmode_ThreatAssignmentTests.html | 2 +- .../bamlab.test.editmode_ThreatTests.html | 2 +- ...lab.test.editmode_TransformationTests.html | 2 +- .../bamlab.test.playmode_ConfigTest.html | 2 +- .../bamlab.test.playmode_SanityTest.html | 2 +- .../Report/bamlab.test_AgentTestBase.html | 2 +- .../Report/bamlab.test_SensorTestBase.html | 2 +- .../editmode/Report/bamlab.test_TestBase.html | 2 +- coverage/editmode/Report/index.htm | 30 +- coverage/editmode/Report/index.html | 30 +- coverage/editmode/Report/main.js | 2 + .../EditMode/TestCoverageResults_0000.xml | 9462 +++++++++-------- .../EditMode/TestCoverageResults_0001.xml | 2350 ++-- 72 files changed, 6754 insertions(+), 5725 deletions(-) create mode 100644 coverage/editmode/Report/bamlab.micromissiles_Cluster.html create mode 100644 coverage/editmode/Report/bamlab.test.editmode_ClusterTest.html diff --git a/coverage/editmode/Report/Summary.json b/coverage/editmode/Report/Summary.json index 41b85bc0..000857f9 100644 --- a/coverage/editmode/Report/Summary.json +++ b/coverage/editmode/Report/Summary.json @@ -1,29 +1,30 @@ { "summary": { - "generatedon": "2025-01-03T02:53:06Z", + "generatedon": "2025-01-03T23:52:40Z", "parser": "MultiReportParser (2x OpenCoverParser)", "assemblies": 4, - "classes": 52, - "files": 50, - "coveredlines": 710, - "uncoveredlines": 2713, - "coverablelines": 3423, - "totallines": 6032, - "linecoverage": 20.7, + "classes": 54, + "files": 52, + "coveredlines": 811, + "uncoveredlines": 2715, + "coverablelines": 3526, + "totallines": 6202, + "linecoverage": 23, "coveredbranches": 0, "totalbranches": 0, - "coveredmethods": 93, - "totalmethods": 460, - "methodcoverage": 20.2 + "coveredmethods": 110, + "totalmethods": 477, + "methodcoverage": 23 }, "coverage": { "assemblies": [ - { "name": "bamlab.micromissiles", "classes": 43, "coverage": 13.5, "coveredlines": 414, "coverablelines": 3048, "totallines": 5863, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 15.9, "coveredmethods": 68, "totalmethods": 427, "classesinassembly": [ + { "name": "bamlab.micromissiles", "classes": 44, "coverage": 14.5, "coveredlines": 449, "coverablelines": 3085, "totallines": 5938, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 17.8, "coveredmethods": 78, "totalmethods": 437, "classesinassembly": [ { "name": "Agent", "coverage": 40.9, "coveredlines": 111, "coverablelines": 271, "totallines": 481, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 44.4, "coveredmethods": 20, "totalmethods": 45 }, { "name": "ApnController", "coverage": 0, "coveredlines": 0, "coverablelines": 8, "totallines": 20, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "AttackBehavior", "coverage": 78.5, "coveredlines": 11, "coverablelines": 14, "totallines": 51, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 66.6, "coveredmethods": 2, "totalmethods": 3 }, { "name": "CameraController", "coverage": 0, "coveredlines": 0, "coverablelines": 347, "totallines": 643, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 36 }, { "name": "CarrierInterceptor", "coverage": 0, "coveredlines": 0, "coverablelines": 51, "totallines": 80, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 7 }, + { "name": "Cluster", "coverage": 94.5, "coveredlines": 35, "coverablelines": 37, "totallines": 75, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 10, "totalmethods": 10 }, { "name": "ConfigLoader", "coverage": 16.9, "coveredlines": 18, "coverablelines": 106, "totallines": 153, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 15.3, "coveredmethods": 2, "totalmethods": 13 }, { "name": "Constants", "coverage": 0, "coveredlines": 0, "coverablelines": 6, "totallines": 17, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "DirectAttackBehavior", "coverage": 28.1, "coveredlines": 9, "coverablelines": 32, "totallines": 74, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 50, "coveredmethods": 1, "totalmethods": 2 }, @@ -66,7 +67,8 @@ { "name": "AgentTestBase", "coverage": 73.9, "coveredlines": 17, "coverablelines": 23, "totallines": 41, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 75, "coveredmethods": 3, "totalmethods": 4 }, { "name": "SensorTestBase", "coverage": 0, "coveredlines": 0, "coverablelines": 11, "totallines": 26, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "TestBase", "coverage": 93.3, "coveredlines": 28, "coverablelines": 30, "totallines": 44, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 6, "totalmethods": 6 } ] }, - { "name": "bamlab.test.editmode", "classes": 4, "coverage": 95.8, "coveredlines": 251, "coverablelines": 262, "totallines": 574, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 88.8, "coveredmethods": 16, "totalmethods": 18, "classesinassembly": [ + { "name": "bamlab.test.editmode", "classes": 5, "coverage": 96.6, "coveredlines": 317, "coverablelines": 328, "totallines": 669, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 92, "coveredmethods": 23, "totalmethods": 25, "classesinassembly": [ + { "name": "ClusterTest", "coverage": 100, "coveredlines": 66, "coverablelines": 66, "totallines": 95, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 7, "totalmethods": 7 }, { "name": "SanityTest", "coverage": 71.4, "coveredlines": 5, "coverablelines": 7, "totallines": 22, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 2, "totalmethods": 2 }, { "name": "ThreatAssignmentTests", "coverage": 100, "coveredlines": 63, "coverablelines": 63, "totallines": 141, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 2, "totalmethods": 2 }, { "name": "ThreatTests", "coverage": 93.1, "coveredlines": 122, "coverablelines": 131, "totallines": 310, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 81.8, "coveredmethods": 9, "totalmethods": 11 }, diff --git a/coverage/editmode/Report/Summary.md b/coverage/editmode/Report/Summary.md index b72c2c2e..a44c0c6d 100644 --- a/coverage/editmode/Report/Summary.md +++ b/coverage/editmode/Report/Summary.md @@ -1,30 +1,31 @@ # Summary ||| |:---|:---| -| Generated on: | 01/03/2025 - 02:53:06 | +| Generated on: | 01/03/2025 - 23:52:40 | | Parser: | MultiReportParser (2x OpenCoverParser) | | Assemblies: | 4 | -| Classes: | 52 | -| Files: | 50 | -| Covered lines: | 710 | -| Uncovered lines: | 2713 | -| Coverable lines: | 3423 | -| Total lines: | 6032 | -| Line coverage: | 20.7% (710 of 3423) | +| Classes: | 54 | +| Files: | 52 | +| Covered lines: | 811 | +| Uncovered lines: | 2715 | +| Coverable lines: | 3526 | +| Total lines: | 6202 | +| Line coverage: | 23% (811 of 3526) | | Covered branches: | 0 | | Total branches: | 0 | -| Covered methods: | 93 | -| Total methods: | 460 | -| Method coverage: | 20.2% (93 of 460) | +| Covered methods: | 110 | +| Total methods: | 477 | +| Method coverage: | 23% (110 of 477) | |**Name**|**Covered**|**Uncovered**|**Coverable**|**Total**|**Line coverage**|**Covered**|**Total**|**Branch coverage**|**Covered**|**Total**|**Method coverage**| |:---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| -|**bamlab.micromissiles**|**414**|**2634**|**3048**|**5863**|**13.5%**|**0**|**0**|****|**68**|**427**|**15.9%**| +|**bamlab.micromissiles**|**449**|**2636**|**3085**|**5938**|**14.5%**|**0**|**0**|****|**78**|**437**|**17.8%**| |Agent|111|160|271|481|40.9%|0|0||20|45|44.4%| |ApnController|0|8|8|20|0%|0|0||0|2|0%| |AttackBehavior|11|3|14|51|78.5%|0|0||2|3|66.6%| |CameraController|0|347|347|643|0%|0|0||0|36|0%| |CarrierInterceptor|0|51|51|80|0%|0|0||0|7|0%| +|Cluster|35|2|37|75|94.5%|0|0||10|10|100%| |ConfigLoader|18|88|106|153|16.9%|0|0||2|13|15.3%| |Constants|0|6|6|17|0%|0|0||0|2|0%| |DirectAttackBehavior|9|23|32|74|28.1%|0|0||1|2|50%| @@ -67,7 +68,8 @@ |AgentTestBase|17|6|23|41|73.9%|0|0||3|4|75%| |SensorTestBase|0|11|11|26|0%|0|0||0|2|0%| |TestBase|28|2|30|44|93.3%|0|0||6|6|100%| -|**bamlab.test.editmode**|**251**|**11**|**262**|**574**|**95.8%**|**0**|**0**|****|**16**|**18**|**88.8%**| +|**bamlab.test.editmode**|**317**|**11**|**328**|**669**|**96.6%**|**0**|**0**|****|**23**|**25**|**92%**| +|ClusterTest|66|0|66|95|100%|0|0||7|7|100%| |SanityTest|5|2|7|22|71.4%|0|0||2|2|100%| |ThreatAssignmentTests|63|0|63|141|100%|0|0||2|2|100%| |ThreatTests|122|9|131|310|93.1%|0|0||9|11|81.8%| diff --git a/coverage/editmode/Report/Summary.xml b/coverage/editmode/Report/Summary.xml index 14205f09..80dee3cd 100644 --- a/coverage/editmode/Report/Summary.xml +++ b/coverage/editmode/Report/Summary.xml @@ -1,29 +1,30 @@ - 01/03/2025 - 02:53:06 + 01/03/2025 - 23:52:40 MultiReportParser (2x OpenCoverParser) 4 - 52 - 50 - 710 - 2713 - 3423 - 6032 - 20.7 + 54 + 52 + 811 + 2715 + 3526 + 6202 + 23 0 0 - 93 - 460 - 20.2 + 110 + 477 + 23 - + + @@ -68,7 +69,8 @@ - + + diff --git a/coverage/editmode/Report/badge_combined.svg b/coverage/editmode/Report/badge_combined.svg index 5163cea5..beeb31b4 100644 --- a/coverage/editmode/Report/badge_combined.svg +++ b/coverage/editmode/Report/badge_combined.svg @@ -77,7 +77,7 @@ Coverage Coverage - 20.7%20.7% + 23%23% N/AN/A diff --git a/coverage/editmode/Report/badge_linecoverage.svg b/coverage/editmode/Report/badge_linecoverage.svg index 6b78969f..66b72722 100644 --- a/coverage/editmode/Report/badge_linecoverage.svg +++ b/coverage/editmode/Report/badge_linecoverage.svg @@ -77,7 +77,7 @@ Coverage Coverage - 20.7%20.7% + 23%23% diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_blue.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_blue.svg index d251c962..d1a5d27b 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_blue.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_blue.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_brightgreen.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_brightgreen.svg index b5061e37..7172d9fd 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_brightgreen.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_brightgreen.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_green.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_green.svg index 4fdf6350..89bb8f6c 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_green.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_green.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_lightgrey.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_lightgrey.svg index 8563402b..ba96847c 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_lightgrey.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_lightgrey.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_orange.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_orange.svg index ba9ccef8..603456b1 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_orange.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_orange.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_red.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_red.svg index 8ba5125e..fb93d1db 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_red.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_red.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_yellow.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_yellow.svg index 47f983b2..d95d422f 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_yellow.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_yellow.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg b/coverage/editmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg index d7c4d738..94bac45e 100644 --- a/coverage/editmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg +++ b/coverage/editmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg @@ -1 +1 @@ - coveragecoverage20%20% \ No newline at end of file + coveragecoverage23%23% \ No newline at end of file diff --git a/coverage/editmode/Report/bamlab.micromissiles_Agent.html b/coverage/editmode/Report/bamlab.micromissiles_Agent.html index 18c93a7a..0b40bc00 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Agent.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Agent.html @@ -568,7 +568,7 @@

/github/workspace/Assets/Scripts/Ag  481} - +

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_ApnController.html b/coverage/editmode/Report/bamlab.micromissiles_ApnController.html index d8c1d836..904bdf24 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_ApnController.html +++ b/coverage/editmode/Report/bamlab.micromissiles_ApnController.html @@ -64,7 +64,7 @@

/github/workspace  20} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_AttackBehavior.html b/coverage/editmode/Report/bamlab.micromissiles_AttackBehavior.html index 6bffe1bd..7529e9d2 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_AttackBehavior.html +++ b/coverage/editmode/Report/bamlab.micromissiles_AttackBehavior.html @@ -96,7 +96,7 @@

/github/workspace/  51} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_CameraController.html b/coverage/editmode/Report/bamlab.micromissiles_CameraController.html index edce41c5..a0756148 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_CameraController.html +++ b/coverage/editmode/Report/bamlab.micromissiles_CameraController.html @@ -719,7 +719,7 @@

/github/workspace/Asse  643public enum CameraMode { FREE, FOLLOW_INTERCEPTOR_SWARM, FOLLOW_THREAT_SWARM, FOLLOW_ALL_AGENTS } -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_CarrierInterceptor.html b/coverage/editmode/Report/bamlab.micromissiles_CarrierInterceptor.html index 01cbbef9..2575f166 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_CarrierInterceptor.html +++ b/coverage/editmode/Report/bamlab.micromissiles_CarrierInterceptor.html @@ -129,7 +129,7 @@

/github/wo  80} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Cluster.html b/coverage/editmode/Report/bamlab.micromissiles_Cluster.html new file mode 100644 index 00000000..5c49dd85 --- /dev/null +++ b/coverage/editmode/Report/bamlab.micromissiles_Cluster.html @@ -0,0 +1,189 @@ + + + + + + +Cluster - Coverage Report + +
+

< Summary

+ ++++ + + + + + + + + + + + + + + + +
Class:Cluster
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Algorithms/Cluster.cs
Covered lines:35
Uncovered lines:2
Coverable lines:37
Total lines:75
Line coverage:94.5% (35 of 37)
Covered branches:0
Total branches:0
Covered methods:10
Total methods:10
Method coverage:100% (10 of 10)
+

Metrics

+ + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Cluster()0%110100%
Size()0%110100%
IsEmpty()0%110100%
Radius()0%2.092071.43%
Centroid()0%3.023086.67%
Recenter()0%110100%
AddPoint(...)0%110100%
AddPoints(...)0%110100%
Merge(...)0%110100%
+

File(s)

+

/github/workspace/Assets/Scripts/Algorithms/Cluster.cs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using System.Linq;
 4using UnityEngine;
 5
 6// The cluster class represents a collection of points with a defined centroid.
 7public class Cluster {
 8  // Centroid of the cluster.
 89  private Vector3 centroid = Vector3.zero;
 10
 11  // List of points in the cluster.
 812  private List<Vector3> points = new List<Vector3>();
 13
 14  // Get the list of points.
 15  public IReadOnlyList<Vector3> Points {
 316    get { return points; }
 17  }
 18
 19  // Return the size of the cluster.
 2120  public int Size() {
 2121    return points.Count;
 2122  }
 23
 24  // Check whether the cluster is empty.
 1725  public bool IsEmpty() {
 1726    return Size() == 0;
 1727  }
 28
 29  // Calculate the radius of the cluster.
 130  public float Radius() {
 131    if (IsEmpty()) {
 032      return 0;
 33    }
 34
 135    Vector3 centroid = Centroid();
 336    return points.Max(point => Vector3.Distance(centroid, point));
 137  }
 38
 39  // Calculate the centroid of the cluster.
 1440  public Vector3 Centroid() {
 1441    if (IsEmpty()) {
 042      return Vector3.zero;
 43    }
 44
 1445    Vector3 centroid = Vector3.zero;
 46546    foreach (var point in points) {
 14147      centroid += point;
 14148    }
 1449    centroid /= points.Count;
 1450    return centroid;
 1451  }
 52
 53  // Recenter the cluster's centroid to be the mean of all points in the cluster.
 854  public void Recenter() {
 855    centroid = Centroid();
 856  }
 57
 58  // Add a point to the cluster.
 59  // This function does not update the centroid of the cluster.
 260  public void AddPoint(in Vector3 point) {
 261    points.Add(point);
 262  }
 63
 64  // Add multiple points to the cluster.
 65  // This function does not update the centroid of the cluster.
 766  public void AddPoints(in IReadOnlyList<Vector3> otherPoints) {
 767    points.AddRange(otherPoints);
 768  }
 69
 70  // Merge another cluster into this one.
 71  // This function does not update the centroid of the cluster.
 172  public void Merge(in Cluster cluster) {
 173    AddPoints(cluster.Points);
 174  }
 75}
+
+
+ + \ No newline at end of file diff --git a/coverage/editmode/Report/bamlab.micromissiles_ConfigLoader.html b/coverage/editmode/Report/bamlab.micromissiles_ConfigLoader.html index 38da8244..962ba4b8 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_ConfigLoader.html +++ b/coverage/editmode/Report/bamlab.micromissiles_ConfigLoader.html @@ -72,9 +72,9 @@

/github/workspace/Asse  4517    www.SendWebRequest();  18  19    // Wait for the request to complete - 13303520    while (!www.isDone) { + 7096520    while (!www.isDone) {  21      // You might want to yield return null here if this is called from a coroutine - 6649522    } + 3546022    }  23  4524    if (www.result != UnityWebRequest.Result.Success) {  025      Debug.LogError($"Error loading file at {filePath}: {www.error}"); @@ -208,7 +208,7 @@

/github/workspace/Asse  153} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Constants.html b/coverage/editmode/Report/bamlab.micromissiles_Constants.html index 3a4c8ab1..c2049235 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Constants.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Constants.html @@ -61,7 +61,7 @@

/github/workspace/Assets/Script  17} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_DirectAttackBehavior.html b/coverage/editmode/Report/bamlab.micromissiles_DirectAttackBehavior.html index ae35d274..27216113 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_DirectAttackBehavior.html +++ b/coverage/editmode/Report/bamlab.micromissiles_DirectAttackBehavior.html @@ -118,7 +118,7 @@

/github/work  74} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_DummyAgent.html b/coverage/editmode/Report/bamlab.micromissiles_DummyAgent.html index 4e706af7..269ca235 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_DummyAgent.html +++ b/coverage/editmode/Report/bamlab.micromissiles_DummyAgent.html @@ -528,7 +528,7 @@

/github/workspace/Assets/Scripts/Ag  481} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_DynamicAgentConfig.html b/coverage/editmode/Report/bamlab.micromissiles_DynamicAgentConfig.html index 4aa4abf1..9e987bda 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_DynamicAgentConfig.html +++ b/coverage/editmode/Report/bamlab.micromissiles_DynamicAgentConfig.html @@ -175,7 +175,7 @@

/github/workspace/  132public enum SensorType { IDEAL } -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_FixedWingThreat.html b/coverage/editmode/Report/bamlab.micromissiles_FixedWingThreat.html index 81a59a18..b12061f3 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_FixedWingThreat.html +++ b/coverage/editmode/Report/bamlab.micromissiles_FixedWingThreat.html @@ -168,7 +168,7 @@

/github/workspace/  117} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_GenerateCone.html b/coverage/editmode/Report/bamlab.micromissiles_GenerateCone.html index 3601642c..a86caf93 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_GenerateCone.html +++ b/coverage/editmode/Report/bamlab.micromissiles_GenerateCone.html @@ -195,7 +195,7 @@

/github/workspace/Asse  144#endif -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_IADS.html b/coverage/editmode/Report/bamlab.micromissiles_IADS.html index ce5a6117..75844e56 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_IADS.html +++ b/coverage/editmode/Report/bamlab.micromissiles_IADS.html @@ -200,7 +200,7 @@

/github/workspace/Assets/Scripts  143} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_IAssignment.html b/coverage/editmode/Report/bamlab.micromissiles_IAssignment.html index f9447e7c..3cd6a5f0 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_IAssignment.html +++ b/coverage/editmode/Report/bamlab.micromissiles_IAssignment.html @@ -85,7 +85,7 @@

/github/workspace/As  40} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_IController.html b/coverage/editmode/Report/bamlab.micromissiles_IController.html index fec0fc84..75340699 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_IController.html +++ b/coverage/editmode/Report/bamlab.micromissiles_IController.html @@ -76,7 +76,7 @@

/github/workspace/As  30} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_IdealSensor.html b/coverage/editmode/Report/bamlab.micromissiles_IdealSensor.html index fe8da9a0..5b0669c6 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_IdealSensor.html +++ b/coverage/editmode/Report/bamlab.micromissiles_IdealSensor.html @@ -69,7 +69,7 @@

/github/workspace/Asse  25} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_InputManager.html b/coverage/editmode/Report/bamlab.micromissiles_InputManager.html index 3dc8b1dc..731dc9ab 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_InputManager.html +++ b/coverage/editmode/Report/bamlab.micromissiles_InputManager.html @@ -207,7 +207,7 @@

/github/workspace/As  156} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Interceptor.html b/coverage/editmode/Report/bamlab.micromissiles_Interceptor.html index fbf20575..a4bc2122 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Interceptor.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Interceptor.html @@ -297,7 +297,7 @@

/github/workspace/Assets/Scri  238} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_ParticleManager.html b/coverage/editmode/Report/bamlab.micromissiles_ParticleManager.html index 740927be..6b4c6c96 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_ParticleManager.html +++ b/coverage/editmode/Report/bamlab.micromissiles_ParticleManager.html @@ -309,7 +309,7 @@

/github/workspace  245} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_PnController.html b/coverage/editmode/Report/bamlab.micromissiles_PnController.html index f11ede59..8b9c8ed5 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_PnController.html +++ b/coverage/editmode/Report/bamlab.micromissiles_PnController.html @@ -105,7 +105,7 @@

/github/workspace/  61} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_RectTransformExtensions.html b/coverage/editmode/Report/bamlab.micromissiles_RectTransformExtensions.html index 70996580..88684eb0 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_RectTransformExtensions.html +++ b/coverage/editmode/Report/bamlab.micromissiles_RectTransformExtensions.html @@ -64,7 +64,7 @@

/github/workspa  18} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_RotaryWingThreat.html b/coverage/editmode/Report/bamlab.micromissiles_RotaryWingThreat.html index a2fc7eaf..d9c2cad9 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_RotaryWingThreat.html +++ b/coverage/editmode/Report/bamlab.micromissiles_RotaryWingThreat.html @@ -126,7 +126,7 @@

/github/workspace  76} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_RoundRobinAssignment.html b/coverage/editmode/Report/bamlab.micromissiles_RoundRobinAssignment.html index 3cdb5330..37cef273 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_RoundRobinAssignment.html +++ b/coverage/editmode/Report/bamlab.micromissiles_RoundRobinAssignment.html @@ -89,7 +89,7 @@

/github/wo  45} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Sensor.html b/coverage/editmode/Report/bamlab.micromissiles_Sensor.html index af958c97..172fb563 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Sensor.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Sensor.html @@ -72,7 +72,7 @@

/github/workspace/Assets/Sc  29} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_SimManager.html b/coverage/editmode/Report/bamlab.micromissiles_SimManager.html index da3481af..b884af4b 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_SimManager.html +++ b/coverage/editmode/Report/bamlab.micromissiles_SimManager.html @@ -701,7 +701,7 @@

/github/workspace/Assets/Scrip  614} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_SimMonitor.html b/coverage/editmode/Report/bamlab.micromissiles_SimMonitor.html index 1e367013..fae5bd32 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_SimMonitor.html +++ b/coverage/editmode/Report/bamlab.micromissiles_SimMonitor.html @@ -317,7 +317,7 @@

/github/workspace/Assets/Scripts/  255} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_SimulationConfig.html b/coverage/editmode/Report/bamlab.micromissiles_SimulationConfig.html index 12fa5547..31e2dc98 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_SimulationConfig.html +++ b/coverage/editmode/Report/bamlab.micromissiles_SimulationConfig.html @@ -175,7 +175,7 @@

/github/workspace/  132public enum SensorType { IDEAL } -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_StaticAgentConfig.html b/coverage/editmode/Report/bamlab.micromissiles_StaticAgentConfig.html index 603e32f3..f098a661 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_StaticAgentConfig.html +++ b/coverage/editmode/Report/bamlab.micromissiles_StaticAgentConfig.html @@ -110,7 +110,7 @@

/github/workspace/Asse  63public enum PowerSetting { IDLE, LOW, CRUISE, MIL, MAX } -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_SwarmStatusDialog.html b/coverage/editmode/Report/bamlab.micromissiles_SwarmStatusDialog.html index 76837603..18d34202 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_SwarmStatusDialog.html +++ b/coverage/editmode/Report/bamlab.micromissiles_SwarmStatusDialog.html @@ -225,7 +225,7 @@

/github/worksp  167} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Threat.html b/coverage/editmode/Report/bamlab.micromissiles_Threat.html index 47fe0928..04403140 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Threat.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Threat.html @@ -234,7 +234,7 @@

/github/workspace/Assets/Sc  182} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_ThreatAssignment.html b/coverage/editmode/Report/bamlab.micromissiles_ThreatAssignment.html index 3ffdf103..ae953545 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_ThreatAssignment.html +++ b/coverage/editmode/Report/bamlab.micromissiles_ThreatAssignment.html @@ -125,7 +125,7 @@

/github/worksp  80} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_ThreatData.html b/coverage/editmode/Report/bamlab.micromissiles_ThreatData.html index ec073162..7ae05e7f 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_ThreatData.html +++ b/coverage/editmode/Report/bamlab.micromissiles_ThreatData.html @@ -95,7 +95,7 @@

/github/workspace/Assets/S  49} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIBuildButton.html b/coverage/editmode/Report/bamlab.micromissiles_UIBuildButton.html index bbbbbc93..6a1dd5fc 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIBuildButton.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIBuildButton.html @@ -55,7 +55,7 @@

/github/workspace/Assets/  11} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIDialog.html b/coverage/editmode/Report/bamlab.micromissiles_UIDialog.html index 57a19ced..1fbb76ef 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIDialog.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIDialog.html @@ -277,7 +277,7 @@

/github/workspace/Assets/Scrip  217} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIElementDragger.html b/coverage/editmode/Report/bamlab.micromissiles_UIElementDragger.html index d3eade46..51d41b5f 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIElementDragger.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIElementDragger.html @@ -55,7 +55,7 @@

/github/workspace/Asse  12} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIElementMouseCapturer.html b/coverage/editmode/Report/bamlab.micromissiles_UIElementMouseCapturer.html index bfe7843d..1de70b98 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIElementMouseCapturer.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIElementMouseCapturer.html @@ -65,7 +65,7 @@

/github/workspac  20} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIHitMarker.html b/coverage/editmode/Report/bamlab.micromissiles_UIHitMarker.html index adc12cab..88448556 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIHitMarker.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIHitMarker.html @@ -75,7 +75,7 @@

/github/workspace/Assets/Scri  29} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIManager.html b/coverage/editmode/Report/bamlab.micromissiles_UIManager.html index 1c818c12..8b990540 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIManager.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIManager.html @@ -306,7 +306,7 @@

/github/workspace/Assets/Scri  237public enum UIMode { NONE, BUILD, MINE } -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UISelectableEntry.html b/coverage/editmode/Report/bamlab.micromissiles_UISelectableEntry.html index f3bc0274..9057ff66 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UISelectableEntry.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UISelectableEntry.html @@ -195,7 +195,7 @@

/github/workspace/Ass  138} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_UIWindow.html b/coverage/editmode/Report/bamlab.micromissiles_UIWindow.html index f5394a7b..3c1d96e8 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_UIWindow.html +++ b/coverage/editmode/Report/bamlab.micromissiles_UIWindow.html @@ -151,7 +151,7 @@

/github/workspace/Asset  100} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Utilities.html b/coverage/editmode/Report/bamlab.micromissiles_Utilities.html index 063144a2..412d7043 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Utilities.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Utilities.html @@ -52,7 +52,7 @@

/github/workspace/Assets/Script  9} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_Vessel.html b/coverage/editmode/Report/bamlab.micromissiles_Vessel.html index 08d759bc..0071e328 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_Vessel.html +++ b/coverage/editmode/Report/bamlab.micromissiles_Vessel.html @@ -74,7 +74,7 @@

/github/workspace/Assets/Scrip  27} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.micromissiles_WaypointController.html b/coverage/editmode/Report/bamlab.micromissiles_WaypointController.html index 19be2a30..af260a1f 100644 --- a/coverage/editmode/Report/bamlab.micromissiles_WaypointController.html +++ b/coverage/editmode/Report/bamlab.micromissiles_WaypointController.html @@ -66,7 +66,7 @@

/github/work  22} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.editmode_ClusterTest.html b/coverage/editmode/Report/bamlab.test.editmode_ClusterTest.html new file mode 100644 index 00000000..b0c52aca --- /dev/null +++ b/coverage/editmode/Report/bamlab.test.editmode_ClusterTest.html @@ -0,0 +1,204 @@ + + + + + + +ClusterTest - Coverage Report + +
+

< Summary

+ ++++ + + + + + + + + + + + + + + + +
Class:ClusterTest
Assembly:bamlab.test.editmode
File(s):/github/workspace/Assets/Tests/EditMode/ClusterTest.cs
Covered lines:66
Uncovered lines:0
Coverable lines:66
Total lines:95
Line coverage:100% (66 of 66)
Covered branches:0
Total branches:0
Covered methods:7
Total methods:7
Method coverage:100% (7 of 7)
+

Metrics

+ + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GenerateCluster(...)0%110100%
TestSize()0%220100%
TestIsEmpty()0%110100%
TestRadius()0%110100%
TestCentroid()0%330100%
TestRecenter()0%330100%
TestMerge()0%220100%
+

File(s)

+

/github/workspace/Assets/Tests/EditMode/ClusterTest.cs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using NUnit.Framework;
 2using UnityEngine;
 3using UnityEngine.TestTools;
 4using System.Collections;
 5using System.Collections.Generic;
 6
 7public class ClusterTest {
 68  public static Cluster GenerateCluster(in IReadOnlyList<Vector3> points) {
 69    Cluster cluster = new Cluster();
 610    cluster.AddPoints(points);
 611    cluster.Recenter();
 612    return cluster;
 613  }
 14
 15  [Test]
 116  public void TestSize() {
 17    const int size = 10;
 118    List<Vector3> points = new List<Vector3>();
 3219    for (int i = 0; i < size; ++i) {
 1020      points.Add(new Vector3(0, i, 0));
 1021    }
 122    Cluster cluster = GenerateCluster(points);
 123    Assert.AreEqual(cluster.Size(), size);
 124  }
 25
 26  [Test]
 127  public void TestIsEmpty() {
 128    Cluster emptyCluster = new Cluster();
 129    Assert.IsTrue(emptyCluster.IsEmpty());
 30
 131    Cluster cluster = new Cluster();
 132    cluster.AddPoint(new Vector3(1, -1, 0));
 133    Assert.IsFalse(cluster.IsEmpty());
 134  }
 35
 36  [Test]
 137  public void TestRadius() {
 38    const float radius = 5;
 139    List<Vector3> points = new List<Vector3> {
 40      new Vector3(0, radius, 0),
 41      new Vector3(0, -radius, 0),
 42    };
 143    Cluster cluster = GenerateCluster(points);
 144    Assert.AreEqual(cluster.Radius(), radius);
 145  }
 46
 47  [Test]
 148  public void TestCentroid() {
 49    const float radius = 3;
 150    List<Vector3> points = new List<Vector3>();
 1151    for (int i = -1; i <= 1; ++i) {
 3352      for (int j = -1; j <= 1; ++j) {
 953        points.Add(new Vector3(i, j, 0));
 954      }
 355    }
 156    Cluster cluster = GenerateCluster(points);
 157    Assert.AreEqual(cluster.Centroid(), Vector3.zero);
 158  }
 59
 60  [Test]
 161  public void TestRecenter() {
 62    const float radius = 3;
 163    List<Vector3> points = new List<Vector3>();
 1164    for (int i = -1; i <= 1; ++i) {
 3365      for (int j = -1; j <= 1; ++j) {
 966        points.Add(new Vector3(i, j, 0));
 967      }
 368    }
 169    Cluster cluster = GenerateCluster(points);
 170    cluster.AddPoint(new Vector3(10, -10, 0));
 171    cluster.Recenter();
 172    Assert.AreEqual(cluster.Centroid(), new Vector3(1, -1, 0));
 173  }
 74
 75  [Test]
 176  public void TestMerge() {
 77    const int size = 10;
 178    List<Vector3> points1 = new List<Vector3>();
 179    List<Vector3> points2 = new List<Vector3>();
 3280    for (int i = 0; i < size; ++i) {
 1081      points1.Add(new Vector3(0, i, 0));
 1082      points2.Add(new Vector3(i, 0, 0));
 1083    }
 184    Cluster cluster1 = GenerateCluster(points1);
 185    Cluster cluster2 = GenerateCluster(points2);
 186    int size1 = cluster1.Size();
 187    int size2 = cluster2.Size();
 188    Vector3 centroid1 = cluster1.Centroid();
 189    Vector3 centroid2 = cluster2.Centroid();
 190    cluster1.Merge(cluster2);
 191    cluster1.Recenter();
 192    Assert.AreEqual(cluster1.Size(), size1 + size2);
 193    Assert.AreEqual(cluster1.Centroid(), (centroid1 + centroid2) / 2);
 194  }
 95}
+
+
+ + \ No newline at end of file diff --git a/coverage/editmode/Report/bamlab.test.editmode_SanityTest.html b/coverage/editmode/Report/bamlab.test.editmode_SanityTest.html index bb28e1b4..dc397978 100644 --- a/coverage/editmode/Report/bamlab.test.editmode_SanityTest.html +++ b/coverage/editmode/Report/bamlab.test.editmode_SanityTest.html @@ -66,7 +66,7 @@

/github/workspace/Assets  22} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.editmode_ThreatAssignmentTests.html b/coverage/editmode/Report/bamlab.test.editmode_ThreatAssignmentTests.html index 68796f41..f37c684e 100644 --- a/coverage/editmode/Report/bamlab.test.editmode_ThreatAssignmentTests.html +++ b/coverage/editmode/Report/bamlab.test.editmode_ThreatAssignmentTests.html @@ -185,7 +185,7 @@

/github/works  141} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.editmode_ThreatTests.html b/coverage/editmode/Report/bamlab.test.editmode_ThreatTests.html index e80ad070..52128093 100644 --- a/coverage/editmode/Report/bamlab.test.editmode_ThreatTests.html +++ b/coverage/editmode/Report/bamlab.test.editmode_ThreatTests.html @@ -363,7 +363,7 @@

/github/workspace/Asset  310} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.editmode_TransformationTests.html b/coverage/editmode/Report/bamlab.test.editmode_TransformationTests.html index 456948b3..f3005d62 100644 --- a/coverage/editmode/Report/bamlab.test.editmode_TransformationTests.html +++ b/coverage/editmode/Report/bamlab.test.editmode_TransformationTests.html @@ -146,7 +146,7 @@

/github/workspa  101} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.playmode_ConfigTest.html b/coverage/editmode/Report/bamlab.test.playmode_ConfigTest.html index cc49a5bb..4569518b 100644 --- a/coverage/editmode/Report/bamlab.test.playmode_ConfigTest.html +++ b/coverage/editmode/Report/bamlab.test.playmode_ConfigTest.html @@ -117,7 +117,7 @@

/github/workspace/Assets  73} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test.playmode_SanityTest.html b/coverage/editmode/Report/bamlab.test.playmode_SanityTest.html index 190f0637..55f173a9 100644 --- a/coverage/editmode/Report/bamlab.test.playmode_SanityTest.html +++ b/coverage/editmode/Report/bamlab.test.playmode_SanityTest.html @@ -67,7 +67,7 @@

/github/workspace/Assets  24} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test_AgentTestBase.html b/coverage/editmode/Report/bamlab.test_AgentTestBase.html index 9690bb37..7f53aab5 100644 --- a/coverage/editmode/Report/bamlab.test_AgentTestBase.html +++ b/coverage/editmode/Report/bamlab.test_AgentTestBase.html @@ -87,7 +87,7 @@

/github/workspace/Assets/Test  41} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test_SensorTestBase.html b/coverage/editmode/Report/bamlab.test_SensorTestBase.html index 2faa8442..d58738d2 100644 --- a/coverage/editmode/Report/bamlab.test_SensorTestBase.html +++ b/coverage/editmode/Report/bamlab.test_SensorTestBase.html @@ -70,7 +70,7 @@

/github/workspace/Assets/Tes  26} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/bamlab.test_TestBase.html b/coverage/editmode/Report/bamlab.test_TestBase.html index 9638fc30..8c5b34d2 100644 --- a/coverage/editmode/Report/bamlab.test_TestBase.html +++ b/coverage/editmode/Report/bamlab.test_TestBase.html @@ -92,7 +92,7 @@

/github/workspace/Assets/Tests/Tes  44} -

+

Methods/Properties

diff --git a/coverage/editmode/Report/index.htm b/coverage/editmode/Report/index.htm index aa4930db..f3912628 100644 --- a/coverage/editmode/Report/index.htm +++ b/coverage/editmode/Report/index.htm @@ -14,21 +14,21 @@

SummaryCoveredUncoveredCoverableTotalLine coverageCoveredTotalBranch coverage -bamlab.micromissiles41426343048586313.5%
  
00
 
+bamlab.micromissiles44926363085593814.5%
  
00
 
Agent11116027148140.9%
  
00
 
ApnController088200%
 
00
 
AttackBehavior113145178.5%
  
00
 
CameraController03473476430%
 
00
 
CarrierInterceptor05151800%
 
00
 
+Cluster352377594.5%
  
00
 
ConfigLoader188810615316.9%
  
00
 
Constants066170%
 
00
 
DirectAttackBehavior923327428.1%
  
00
 
@@ -259,7 +260,8 @@

Coverage

AgentTestBase176234173.9%
  
00
 
SensorTestBase01111260%
 
00
 
TestBase282304493.3%
  
00
 
-bamlab.test.editmode2511126257495.8%
  
00
 
+bamlab.test.editmode3171132866996.6%
  
00
 
+ClusterTest6606695100%
 
00
 
SanityTest5272271.4%
  
00
 
ThreatAssignmentTests63063141100%
 
00
 
ThreatTests122913131093.1%
  
00
 
@@ -270,7 +272,7 @@

Coverage

-
+