Skip to content

Merging new tests #60

Merged
qualand merged 16 commits intoNatLabRockies:developfrom
Amiable-Vagabond:develop
Mar 17, 2025
Merged

Merging new tests #60
qualand merged 16 commits intoNatLabRockies:developfrom
Amiable-Vagabond:develop

Conversation

@Amiable-Vagabond
Copy link
Contributor

Merging new tests into base repo. These include:
st_hfsf_sim_run_test.cpp - high flux solar furnace sample
st_parabola_sim_run_test.cpp - parabola sample (doesn't work and is commented out)
st_powertower_sim_run_noopt_test.cpp - powertower sample with no optimization
st_powertower_sim_run_opt_test.cpp - powertower sample with optimization

@jmaack24 jmaack24 requested a review from qualand March 12, 2025 14:12
@qualand
Copy link
Collaborator

qualand commented Mar 13, 2025

Why does actions only show 1 test? and why does it not use the test names?

@Amiable-Vagabond
Copy link
Contributor Author

Why does actions only show 1 test? and why does it not use the test names?

Looks like this is because all tests are being compiled into a single executable. The ctest command has a verbose flag -VV, I'll add that to the github workflow file so it will print all outputs.

Copy link
Collaborator

@qualand qualand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! Please see my comments and we can discuss tomorrow.

@qualand
Copy link
Collaborator

qualand commented Mar 14, 2025

Can you remove all the extra outputs in the tests?
for example
"
1: input file: /Users/runner/work/SolTrace/SolTrace/build/google-tests/High Flux Solar Furnace.stinput
1: loading input file version 2016.1.1
1: sun ps? 0 cs: p -0.499195 0.703243 -0.506215
1: stage 'Heliostat': [1] 0.04 1.284 27.339 -2.87652 5.10737 18.5711 0 0 0 0
1: stage 'Primary Mirror Array': [25] 0 0 0 0 0 1 0 0 0 0
1: stage 'Target': [1] 3.255 -0.851 6.175 0 0 0 0 1 0 0
1: Stage 1:
"

Copy link
Collaborator

@qualand qualand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the couple of comments and we should be good to go!

#include <cstring>
#include <vector>
#include <exception>
#include <cstdlib>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove all unneeded libraries?


TEST(st_hfsf_sim_run_opt_test, BasicAssertions)
{
string project_dir = PROJECT_DIR;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line


TEST(st_powertower_sim_run_noopt_test, BasicAssertions)
{
string project_dir = PROJECT_DIR;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line


TEST(st_powertower_sim_run_opt_test, BasicAssertions)
{
string project_dir = PROJECT_DIR;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Collaborator

@qualand qualand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just saw gtest's guidance on this. Feel free use or change my suggestions.


using namespace std;

TEST(st_hfsf_sim_run_opt_test, BasicAssertions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove all underscores from all test suite names and test names?
See gtest FAQ: https://google.github.io/googletest/faq.html

Suggested change
TEST(st_hfsf_sim_run_opt_test, BasicAssertions)
TEST(HighFluxSolarFurnace, RaysTraced1e5OpticalErrorsOff)


using namespace std;

TEST(st_powertower_sim_run_noopt_test, BasicAssertions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(st_powertower_sim_run_noopt_test, BasicAssertions)
TEST(PowerTowerSurroundSingleFacet, RaysTraced5e5NoOpticalErrors)


using namespace std;

TEST(st_powertower_sim_run_opt_test, BasicAssertions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(st_powertower_sim_run_opt_test, BasicAssertions)
TEST(PowerTowerSurroundSingleFacet, RaysTraced5e5NoOpticalErrorsPowTowerOptOn)

@@ -25,32 +14,23 @@ double roundToDecimalPlaces(double value, int decimalPlaces) {

TEST(st_sim_run_test, BasicAssertions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(st_sim_run_test, BasicAssertions)
TEST(ApertureExamples, SingleRayNoOpticalErrors)


using namespace std;

TEST(st_hfsf_sim_run_opt_test, BasicAssertions)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed this test for renaming.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agh, I didn't add the change during last commit. Fixed shortly

@qualand qualand merged commit b67574c into NatLabRockies:develop Mar 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants