Created
October 10, 2016 18:01
-
-
Save terabyte/cf32157bb4f47d3bbc11549739ca51ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtest/gtest.h> | |
#include <list> | |
#include <string> | |
#include "developers.h" | |
using namespace std; | |
TEST(Developers, DeveloperListIsUpToDate) { | |
developers *d = new developers(); | |
const list<string> & dlist = d->getDevelopers(); | |
EXPECT_EQ((long unsigned int)2, dlist.size()) << "The developer list should contain two devs"; | |
list<string>::const_iterator iter = dlist.begin(); | |
EXPECT_EQ("amling", *iter) << "The first developer is amling"; | |
++iter; | |
EXPECT_EQ("cmyers", *iter) << "The second developer is cmyers"; | |
} | |
int main(int ac, char *av[]) { | |
testing::InitGoogleTest(&ac, av); | |
return RUN_ALL_TESTS(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment