@@ -286,19 +286,23 @@ TEST_CASE("ProcessOutputBuffer", "[sgp][sgp-unit]") {
286286
287287
288288TEST_CASE (" debt" , " [sgp][sgp-unit]" ){
289- GIVEN (" A zero point value" ){
290- emp::Random random (31 );
291- sgpmode::SymConfigSGP config;
292- config.TASK_ENV_CFG_PATH (" source/test/sgp_mode_test/hardware-test-env.json" );
293- world_t world (random, &config);
294- auto & prog_builder = world.GetProgramBuilder ();
295- emp::Ptr<sgp_host_t > host = emp::NewPtr<sgp_host_t >(&random, &world, &config, prog_builder.CreateNotProgram (100 ));
296-
297- WHEN (" points are added to make total points negative" ){
298- host->AddPoints (-100 );
299- THEN (" point value should be set to zero" ){
300- REQUIRE (host->GetPoints () == 0 );
301- }
302- }
289+ using world_t = sgpmode::SGPWorld;
290+ using cpu_state_t = sgpmode::CPUState<world_t >;
291+ using hw_spec_t = sgpmode::SGPHardwareSpec<sgpmode::Library, cpu_state_t , world_t >;
292+ using sgp_host_t = sgpmode::SGPHost<hw_spec_t >;
293+ GIVEN (" A zero point value" ){
294+ emp::Random random (31 );
295+ sgpmode::SymConfigSGP config;
296+ config.TASK_ENV_CFG_PATH (" source/test/sgp_mode_test/hardware-test-env.json" );
297+ world_t world (random, &config);
298+ auto & prog_builder = world.GetProgramBuilder ();
299+ emp::Ptr<sgp_host_t > host = emp::NewPtr<sgp_host_t >(&random, &world, &config, prog_builder.CreateNotProgram (100 ));
300+
301+ WHEN (" points are added to make total points negative" ){
302+ host->AddPoints (-100 );
303+ THEN (" point value should be set to zero" ){
304+ REQUIRE (host->GetPoints () == 0 );
305+ }
303306 }
307+ }
304308}
0 commit comments