exml/test/exmlTestAll.cpp

55 lines
1.8 KiB
C++
Raw Normal View History

2016-04-13 23:39:22 +02:00
/** @file
* @author Edouard DUPIN
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
2016-10-02 15:58:37 +02:00
#include "exmlTestCommon.hpp"
#include <gtest/gtest.h>
TEST(TestAll, testBase) {
exmlLocalTest( "<exemple>\n"
" <ex2 ploppp-plpl:erer=\"dfsdfsdfsdf\" lkmjmlk=\"156235\" sdfsdf=\"456321\"/>\n"
" <exlkjl-_dsfg./>\n"
" <ex2>Text example ...</ex2>\n"
"</exemple>\n",
"< exemple\n >\n"
" <ex2 ploppp-plpl:erer=\"dfsdfsdfsdf\" lkmjmlk=\"156235\" sdfsdf=456321 />\n"
" <exlkjl-_dsfg./>\n"
" <ex2>\n"
" Text example ...\n"
" </ex2>\n"
"</exemple>\n",
-1);
}
TEST(TestAll, testError) {
exmlLocalTest( "",
"< exemple\n >\n"
" <ex2 ploppp-plpl:erer=\"dfsdfsdfsdf\" lkmjmlk=\"156235\" sdfsdf=456321 />\n"
" <exlkjl-_dsfg./> >\n"
" <ex2>\n"
" Text example ...\n"
" </ex2>\n"
"</exemple>\n",
1);
}
2016-04-13 23:39:22 +02:00
TEST(TestAll, testCaseSensitive) {
exmlLocalTest( "<exemple>\n"
" <ex2 ploppp-plpl:erer=\"dfsdfsdfsdf\" lkmjmlk=\"156235\" sdfsdf=\"456321\"/>\n"
" <exlkjl-_dsfg./>\n"
" <ex2>Text example ...</ex2>\n"
"</exemple>\n",
"< exemple\n >\n"
" <ex2 ploppp-plpl:erer=\"dfsdfsdfsdf\" lkmjmlk=\"156235\" sdfsdf=456321 />\n"
" <exlkjl-_dsfg./>\n"
" <ex2>\n"
" Text example ...\n"
" </ex2>\n"
"</exemple>\n",
-1,
2016-04-13 23:39:22 +02:00
false);
}