FieldCodeGenerator.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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/decompiler/field/FieldCodeGenerator.h"
  17. BOOST_AUTO_TEST_CASE(TestFieldCodeGenerator){
  18. FunctionMetaData entity_only("start_end_Cloud");
  19. BOOST_CHECK(entity_only.IsStart());
  20. BOOST_CHECK(entity_only.IsEnd());
  21. BOOST_CHECK_EQUAL(entity_only.GetEntityName(), "Cloud");
  22. BOOST_CHECK_EQUAL(entity_only.GetCharacterId(), -1);
  23. FunctionMetaData with_character("start_end_0_Cloud");
  24. BOOST_CHECK(with_character.IsStart());
  25. BOOST_CHECK(with_character.IsEnd());
  26. BOOST_CHECK_EQUAL(with_character.GetEntityName(), "Cloud");
  27. BOOST_CHECK_EQUAL(with_character.GetCharacterId(), 0);
  28. }