The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

32 lines
753 B

4 weeks ago
  1. #include "mock_event_handler.h"
  2. #include "yaml-cpp/yaml.h" // IWYU pragma: keep
  3. #include "gmock/gmock.h"
  4. #include "gtest/gtest.h"
  5. using ::testing::InSequence;
  6. using ::testing::NiceMock;
  7. using ::testing::StrictMock;
  8. namespace YAML {
  9. class HandlerTest : public ::testing::Test {
  10. protected:
  11. void Parse(const std::string& example) {
  12. std::stringstream stream(example);
  13. Parser parser(stream);
  14. while (parser.HandleNextDocument(handler)) {
  15. }
  16. }
  17. void IgnoreParse(const std::string& example) {
  18. std::stringstream stream(example);
  19. Parser parser(stream);
  20. while (parser.HandleNextDocument(nice_handler)) {
  21. }
  22. }
  23. InSequence sequence;
  24. StrictMock<MockEventHandler> handler;
  25. NiceMock<MockEventHandler> nice_handler;
  26. };
  27. }