mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
36 lines
1017 B
C
36 lines
1017 B
C
#include "global.h"
|
|
#include "pokemon_storage_system.h"
|
|
#include "test/test.h"
|
|
|
|
// If you would like to ensure save compatibility, update the values below with those for your hack. You can find these through the debug menu.
|
|
// Please note that this simple check is not 100% foolproof, but should be able to catch most unintended shifts.
|
|
#define T_SAVEBLOCK1_SIZE 15568
|
|
#define T_SAVEBLOCK2_SIZE 3884
|
|
#define T_SAVEBLOCK3_SIZE 4
|
|
#define T_POKEMONSTORAGE_SIZE 34144
|
|
|
|
TEST("SaveBlock1 is backwards compatible")
|
|
{
|
|
EXPECT_EQ(sizeof(struct SaveBlock1), T_SAVEBLOCK1_SIZE);
|
|
}
|
|
|
|
TEST("SaveBlock2 is backwards compatible")
|
|
{
|
|
EXPECT_EQ(sizeof(struct SaveBlock2), T_SAVEBLOCK2_SIZE);
|
|
}
|
|
|
|
TEST("SaveBlock3 is backwards compatible")
|
|
{
|
|
EXPECT_EQ(sizeof(struct SaveBlock3), T_SAVEBLOCK3_SIZE);
|
|
}
|
|
|
|
TEST("PokemonStorage is backwards compatible")
|
|
{
|
|
EXPECT_EQ(sizeof(struct PokemonStorage), T_POKEMONSTORAGE_SIZE);
|
|
}
|
|
|
|
#undef T_SAVEBLOCK1_SIZE
|
|
#undef T_SAVEBLOCK2_SIZE
|
|
#undef T_SAVEBLOCK3_SIZE
|
|
#undef T_POKEMONSTORAGE_SIZE
|