Skip to content

Instantly share code, notes, and snippets.

@osyo-manga
Created June 29, 2017 01:22
Show Gist options
  • Save osyo-manga/abbf0c311b8075d27bc37e8539021dc2 to your computer and use it in GitHub Desktop.
Save osyo-manga/abbf0c311b8075d27bc37e8539021dc2 to your computer and use it in GitHub Desktop.
#define CATCH_CONFIG_MAIN
#include "./catch.hpp"
#include <vector>
#include <list>
template<typename List>
void func(){
List v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
REQUIRE((v == List{1, 2, 3}));
REQUIRE((v == List{1, 2, 5}));
}
TEST_CASE("test", "std::vector"){
func<std::vector<int>>();
func<std::list<int>>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment