Created
February 24, 2020 18:11
-
-
Save ZenulAbidin/c30d75bc0be51af813dd98f5f8248687 to your computer and use it in GitHub Desktop.
Code I wrote so far. I need a way to pass multiple arguments to a boost test function.
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
#define BOOST_TEST_MODULE paintColor | |
#include <boost/test/included/unit_test.hpp> | |
using namespace std; | |
void colorpaint_test_function( string s, string out, vector<float> expected ) | |
{ | |
cout << out << endl << "=========" << endl; | |
vector<float> v = paintColor(s); // paintColor() defined elsewhere | |
copy(v.begin(), v.end(), ostream_iterator<float>(cout, " ")); | |
cout << endl; | |
BOOST_TEST( v == expected); | |
} | |
BOOST_AUTO_TEST_CASE(color_convert) | |
{ | |
string[] first = {"#FF0000", "FF0000"}; | |
string[] second = {"paintColor(\"#FF0000\")", paintColor("FF0000")}; | |
vector<float>[] third = {paintColor("#FF0000"), paintColor("FF0000")}; | |
// ...for_each??? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment