mirror of
https://github.com/gwm17/catima.git
synced 2024-11-22 18:28:51 -05:00
tests
This commit is contained in:
parent
1846fd625f
commit
49b96aaa20
|
@ -50,6 +50,9 @@ const lest::test specification[] =
|
|||
{12,6,1}
|
||||
});
|
||||
|
||||
catima::Config c1;
|
||||
c1.z_effective = catima::z_eff_type::global;
|
||||
|
||||
catima::_storage.Reset();
|
||||
EXPECT(catima::_storage.get_index()==0);
|
||||
|
||||
|
@ -72,6 +75,16 @@ const lest::test specification[] =
|
|||
|
||||
catima::_storage.Add(p,graphite);
|
||||
EXPECT(catima::_storage.get_index()==2);
|
||||
|
||||
catima::_storage.Add(p,graphite, c1);
|
||||
EXPECT(catima::_storage.get_index()==3);
|
||||
|
||||
catima::_storage.Add(p,graphite);
|
||||
EXPECT(catima::_storage.get_index()==3);
|
||||
c1.z_effective = catima::z_eff_type::atima14;
|
||||
catima::_storage.Add(p,graphite ,c1);
|
||||
EXPECT(catima::_storage.get_index()==4);
|
||||
|
||||
},
|
||||
CASE("test maximum storage"){ // this test assumes max storage = 50
|
||||
catima::Projectile p{12,6,6,1000};
|
||||
|
|
|
@ -147,10 +147,22 @@ const lest::test specification[] =
|
|||
catima::Config c1;
|
||||
catima::Config c2;
|
||||
catima::Config c3{catima::z_eff_type::none};
|
||||
|
||||
|
||||
catima::Config c4;
|
||||
EXPECT(c1.z_effective == catima::z_eff_type::pierce_blann);
|
||||
EXPECT(c1.z_effective != catima::z_eff_type::atima14);
|
||||
EXPECT(c1==c2);
|
||||
EXPECT( !(c1==c3));
|
||||
EXPECT(c1==c4);
|
||||
c4.z_effective = catima::z_eff_type::global;
|
||||
EXPECT(!(c1==c4));
|
||||
auto c5 = c4;
|
||||
EXPECT(c4==c5);
|
||||
c4.z_effective = catima::z_eff_type::atima14;
|
||||
EXPECT(!(c4==c5) );
|
||||
EXPECT(!(c4==c1));
|
||||
c4.z_effective = catima::z_eff_type::pierce_blann;
|
||||
EXPECT(!(c5==c4));
|
||||
EXPECT((c1==c4));
|
||||
},
|
||||
CASE("constructors test"){
|
||||
catima::Material mat2(12,6,2.5,0.1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user