-
Notifications
You must be signed in to change notification settings - Fork 33
Changed so that the 'season' starts on the opposite one #317
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
Changes from 12 commits
5224f75
2c92d81
86fe2dc
1184a96
f54a1b1
6278aa9
14f53f3
0e111dd
e23ea47
b1f3ed0
15cf4ac
6e4cc9e
db5544d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,4 +282,27 @@ TEST_CASE("ProcessOutputBuffer", "[sgp][sgp-unit]") { | |
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| TEST_CASE("debt", "[sgp][sgp-unit]"){ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Longer phrase please |
||
| using world_t = sgpmode::SGPWorld; | ||
| using cpu_state_t = sgpmode::CPUState<world_t>; | ||
| using hw_spec_t = sgpmode::SGPHardwareSpec<sgpmode::Library, cpu_state_t, world_t>; | ||
| using sgp_host_t = sgpmode::SGPHost<hw_spec_t>; | ||
| GIVEN("A zero point value"){ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "A host starting with zero points
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "that can do Not and world punishes not |
||
| emp::Random random(31); | ||
| sgpmode::SymConfigSGP config; | ||
| config.TASK_ENV_CFG_PATH("source/test/sgp_mode_test/hardware-test-env.json"); | ||
| world_t world(random, &config); | ||
| auto& prog_builder = world.GetProgramBuilder(); | ||
| emp::Ptr<sgp_host_t> host = emp::NewPtr<sgp_host_t>(&random, &world, &config, prog_builder.CreateNotProgram(100)); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CreateReproProgram instead |
||
|
|
||
| WHEN("points are added to make total points negative"){ | ||
| host->AddPoints(-100); | ||
| THEN("point value should be set to zero"){ | ||
| REQUIRE(host->GetPoints() == 0); | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.