refactor some more to reduce redundant code.

This commit is contained in:
Axel Kohlmeyer
2020-09-07 08:57:37 -04:00
parent bbb81a8dd0
commit ab5c81f7d6
3 changed files with 26 additions and 45 deletions

View File

@ -18,7 +18,7 @@
using namespace LAMMPS_NS;
TEST(MyPage, int_default) {
TEST(MyPage, int) {
MyPage<int> p;
// default init. maxchunk=1, pagesize=1024
@ -53,12 +53,8 @@ TEST(MyPage, int_default) {
ASSERT_EQ(iptr,p.get(1));
ASSERT_EQ(p.ndatum,3);
ASSERT_EQ(p.nchunk,3);
}
TEST(MyPage, int_custom) {
MyPage<int> p;
// default init. maxchunk=16, pagesize=256
// restart with custom init. maxchunk=16, pagesize=256
int rv = p.init(16,256);
ASSERT_EQ(rv,0);