SHARE
TWEET

Untitled

a guest Oct 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <catch.hpp>
  2. #include <entrance.h>
  3.  
  4. TEST_CASE("Simple all-in-one") {
  5.     std::vector<std::tuple<StudentName, Date, int, std::vector<std::string>>> students;
  6.     students.push_back({{"Petya", "Ivanov"}, {2019, 2, 25}, 100, {"URFU"}});
  7.     students.push_back({{"Ivan", "Ivanov"}, {2019, 2, 25}, 150, {"URFU"}});
  8.     students.push_back({{"Dima", "Ivanov"}, {2018, 2, 25}, 100, {"URFU"}});
  9.     std::vector<std::pair<std::string, int>> university_infos;
  10.     university_infos.push_back({"URFU", 2});
  11.     university_infos.push_back({"MSU", 2});
  12.     auto result = GetStudents(university_infos, students);
  13.     auto urfu_students = result["URFU"];
  14.     REQUIRE(2 == urfu_students.size());
  15.     REQUIRE("Dima" == urfu_students[0].name);
  16.     REQUIRE("Ivan" == urfu_students[1].name);
  17.  
  18.     auto u_count = 0;
  19.     for (auto it = result.begin(); it != result.end(); it++) {
  20.         u_count++;
  21.     }
  22.     REQUIRE(2 == u_count);
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top