TEST_F(TestReadin, test_read_in_vector_incorrect_input_end){ std::stringstream s; s << "1 2 3 a "; std::vector<int> resvect = read_in_vector(s, correct_int, ""); std::vector<int> exp = {1, 2, 3}; EXPECT_EQ(exp, resvect); }
int main(int argc, char **argv) { if( ! testRast() ) { abort_("Test Failed"); } if (argc != 3) { abort_("Usage: program_name <file_out> <vector>"); } //Set Screen and Subsample int w ; int h ; int ss ; //Initialize the polygon soup vector< u_Poly< long , ushort > > polys ; //Read in the list of polygons read_in_vector( polys , argv[2] ,&w , &h , &ss ); int size_s = (int)polys.size(); //Report Number of polygons printf( "%i\n" , size_s ); //Initialize a Depth Buffer zbuff z(w,h,ss); //Rasterize the Scene rastBBox_vec_fix( polys , z ); //Write the Zbuffer to a png z.write_ppm( argv[1] ); return 0; }