/** @file * @author Edouard DUPIN * * @copyright 2014, Edouard DUPIN, all right reserved * * @license APACHE v2.0 (see license file) */ #include #include #include "main.hpp" TEST(TestGradientLinear, horizontal) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_horizontal.svg", data); doc.generateAnImage("TestGradientLinear_horizontal.bmp", g_visualDebug); } TEST(TestGradientLinear, vertical) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_vertical.svg", data); doc.generateAnImage("TestGradientLinear_vertical.bmp", g_visualDebug); } TEST(TestGradientLinear, diag1) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag1.svg", data); doc.generateAnImage("TestGradientLinear_diag1.bmp", g_visualDebug); } TEST(TestGradientLinear, diag1Partiel) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag1Partiel.svg", data); doc.generateAnImage("TestGradientLinear_diag1Partiel.bmp", g_visualDebug); } TEST(TestGradientLinear, diag2) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag2.svg", data); doc.generateAnImage("TestGradientLinear_diag2.bmp", g_visualDebug); } TEST(TestGradientLinear, diag2Rotate0) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate0.svg", data); doc.generateAnImage("TestGradientLinear_diag2Rotate0.bmp", g_visualDebug); } TEST(TestGradientLinear, diag2Rotate1) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate1.svg", data); doc.generateAnImage("TestGradientLinear_diag2Rotate1.bmp", g_visualDebug); } TEST(TestGradientLinear, diag2Rotate2) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag2Rotate2.svg", data); doc.generateAnImage("TestGradientLinear_diag2Rotate2.bmp", g_visualDebug); } TEST(TestGradientLinear, diag2scale) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_diag2scale.svg", data); doc.generateAnImage("TestGradientLinear_diag2scale.bmp", g_visualDebug); } TEST(TestGradientLinear, internalHref) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_internalHref.svg", data); doc.generateAnImage("TestGradientLinear_internalHref.bmp", g_visualDebug); } TEST(TestGradientLinear, unitBox_spreadNone) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadNone.svg", data); doc.generateAnImage("TestGradientLinear_unitBox_spreadNone.bmp", g_visualDebug); } TEST(TestGradientLinear, unitBox_spreadPad) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadPad.svg", data); doc.generateAnImage("TestGradientLinear_unitBox_spreadPad.bmp", g_visualDebug); } TEST(TestGradientLinear, unitBox_spreadReflect) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadReflect.svg", data); doc.generateAnImage("TestGradientLinear_unitBox_spreadReflect.bmp", g_visualDebug); } TEST(TestGradientLinear, unitBox_spreadRepeat) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitBox_spreadRepeat.svg", data); doc.generateAnImage("TestGradientLinear_unitBox_spreadRepeat.bmp", g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadNone) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadNone.svg", data); doc.generateAnImage("TestGradientLinear_unitUser_spreadNone.bmp", g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadPad) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadPad.svg", data); doc.generateAnImage("TestGradientLinear_unitUser_spreadPad.bmp", g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadReflect) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadReflect.svg", data); doc.generateAnImage("TestGradientLinear_unitUser_spreadReflect.bmp", g_visualDebug); } TEST(TestGradientLinear, unitUser_spreadRepeate) { std::string data("\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); esvg::Document doc; doc.parse(data); etk::FSNodeWriteAllData("TestGradientLinear_unitUser_spreadRepeate.svg", data); doc.generateAnImage("TestGradientLinear_unitUser_spreadRepeate.bmp", g_visualDebug); }