|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
#include <components/esm3/loaddial.hpp>
|
|
|
|
|
#include <components/esm3/loadregn.hpp>
|
|
|
|
|
#include <components/esm3/loadscpt.hpp>
|
|
|
|
|
#include <components/esm3/loadweap.hpp>
|
|
|
|
|
#include <components/esm3/player.hpp>
|
|
|
|
|
#include <components/esm3/quickkeys.hpp>
|
|
|
|
|
|
|
|
|
@ -554,6 +555,53 @@ namespace ESM
|
|
|
|
|
EXPECT_EQ(result.mList[0].mMagnMax, record.mList[0].mMagnMax);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST_P(Esm3SaveLoadRecordTest, weaponShouldNotChange)
|
|
|
|
|
{
|
|
|
|
|
Weapon record = {
|
|
|
|
|
.mData = {
|
|
|
|
|
.mWeight = 0,
|
|
|
|
|
.mValue = 1,
|
|
|
|
|
.mType = 2,
|
|
|
|
|
.mHealth = 3,
|
|
|
|
|
.mSpeed = 4,
|
|
|
|
|
.mReach = 5,
|
|
|
|
|
.mEnchant = 6,
|
|
|
|
|
.mChop = { 7, 8 },
|
|
|
|
|
.mSlash = { 9, 10 },
|
|
|
|
|
.mThrust = { 11, 12 },
|
|
|
|
|
.mFlags = 13,
|
|
|
|
|
},
|
|
|
|
|
.mRecordFlags = 0,
|
|
|
|
|
.mId = generateRandomRefId(32),
|
|
|
|
|
.mEnchant = generateRandomRefId(32),
|
|
|
|
|
.mScript = generateRandomRefId(32),
|
|
|
|
|
.mName = generateRandomString(32),
|
|
|
|
|
.mModel = generateRandomString(32),
|
|
|
|
|
.mIcon = generateRandomString(32),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Weapon result;
|
|
|
|
|
saveAndLoadRecord(record, GetParam(), result);
|
|
|
|
|
|
|
|
|
|
EXPECT_EQ(result.mData.mWeight, record.mData.mWeight);
|
|
|
|
|
EXPECT_EQ(result.mData.mValue, record.mData.mValue);
|
|
|
|
|
EXPECT_EQ(result.mData.mType, record.mData.mType);
|
|
|
|
|
EXPECT_EQ(result.mData.mHealth, record.mData.mHealth);
|
|
|
|
|
EXPECT_EQ(result.mData.mSpeed, record.mData.mSpeed);
|
|
|
|
|
EXPECT_EQ(result.mData.mReach, record.mData.mReach);
|
|
|
|
|
EXPECT_EQ(result.mData.mEnchant, record.mData.mEnchant);
|
|
|
|
|
EXPECT_EQ(result.mData.mChop, record.mData.mChop);
|
|
|
|
|
EXPECT_EQ(result.mData.mSlash, record.mData.mSlash);
|
|
|
|
|
EXPECT_EQ(result.mData.mThrust, record.mData.mThrust);
|
|
|
|
|
EXPECT_EQ(result.mData.mFlags, record.mData.mFlags);
|
|
|
|
|
EXPECT_EQ(result.mId, record.mId);
|
|
|
|
|
EXPECT_EQ(result.mEnchant, record.mEnchant);
|
|
|
|
|
EXPECT_EQ(result.mScript, record.mScript);
|
|
|
|
|
EXPECT_EQ(result.mName, record.mName);
|
|
|
|
|
EXPECT_EQ(result.mModel, record.mModel);
|
|
|
|
|
EXPECT_EQ(result.mIcon, record.mIcon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_SUITE_P(FormatVersions, Esm3SaveLoadRecordTest, ValuesIn(getFormats()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|