FieldDataInstaller.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include <boost/test/unit_test.hpp>
  16. #include "installer/FieldDataInstaller.h"
  17. #pragma message("Unimplemented test file: " __FILE__)
  18. BOOST_AUTO_TEST_CASE(TestFieldScriptHeaderResetsTemporaryBanks){
  19. const std::string header = FieldDataInstaller::FieldScriptHeader();
  20. // The container must exist before anything else in the script uses it.
  21. BOOST_CHECK(header.find("EntityContainer = {}") == 0);
  22. BOOST_CHECK(header.find("for address = 0, Banks.SIZE do") != std::string::npos);
  23. BOOST_CHECK(header.find("Banks[5][address] = 0") != std::string::npos);
  24. // Only the temporary banks are reset: saved variables must survive a field change.
  25. BOOST_CHECK(header.find("Banks[1]") == std::string::npos);
  26. BOOST_CHECK(header.find("Banks[2]") == std::string::npos);
  27. }
  28. BOOST_AUTO_TEST_CASE(TestFieldDataInstaller){
  29. // TODO
  30. BOOST_WARN_MESSAGE(false, "Unimplemented test file: FieldDataInstaller");
  31. BOOST_CHECK(0 == 0);
  32. }