Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include "filesystem/File.h"
#include "test/TestUtils.h"
#include "utils/StringUtils.h"
#include "utils/XBMCTinyXML2.h"
#include <gtest/gtest.h>
Classes | |
class | TestXBMCTinyXML2 |
Functions | |
TEST (TestXBMCTinyXML2, ParseFromString) | |
TEST (TestXBMCTinyXML2, ParseFromChar) | |
TEST (TestXBMCTinyXML2, ParseFromCharFail) | |
TEST (TestXBMCTinyXML2, ParseFromFileHandle) | |
std::string | data ("<details><url function=\"ParseTMDBRating\" " "cache=\"tmdb-en-12244.json\">" "http://api.themoviedb.org/3/movie/12244" "?api_key=57983e31fb435df4df77afb854740ea9" "&language=en???</url></details>") |
outputdoc | Parse (data) |
EXPECT_TRUE (outputdoc.SaveFile(xmlfile)) | |
file | Close () |
ASSERT_NE (nullptr, f) | |
inputdoc | LoadFile (f) |
fclose (f) | |
XBMC_DELETETEMPFILE (file) | |
if (root &&(strcmp(root->Value(), "details")==0)) | |
EXPECT_TRUE (retval) | |
Variables | |
CXBMCTinyXML2 | outputdoc |
XFILE::CFile * | file = XBMC_CREATETEMPFILE(".xml") |
std::string | xmlfile = XBMC_TEMPFILEPATH(file) |
CXBMCTinyXML2 | inputdoc |
FILE * | f = fopen(xmlfile.c_str(), "r") |
auto * | root = inputdoc.RootElement() |
ASSERT_NE | ( | nullptr | , |
f | ) |
file Close | ( | ) |
std::string data | ( | ) |
EXPECT_TRUE | ( | outputdoc. | SaveFilexmlfile | ) |
EXPECT_TRUE | ( | retval | ) |
fclose | ( | f | ) |
if | ( | root && | strcmp(root->Value(), "details")==0 | ) |
TEST | ( | TestXBMCTinyXML2 | , |
ParseFromChar | ) |
TEST | ( | TestXBMCTinyXML2 | , |
ParseFromCharFail | ) |
TEST | ( | TestXBMCTinyXML2 | , |
ParseFromFileHandle | ) |
TEST | ( | TestXBMCTinyXML2 | , |
ParseFromString | ) |
XBMC_DELETETEMPFILE | ( | file | ) |
FILE* f = fopen(xmlfile.c_str(), "r") |
file = XBMC_CREATETEMPFILE(".xml") |
CXBMCTinyXML2 inputdoc |
CXBMCTinyXML2 outputdoc |
auto* root = inputdoc.RootElement() |
std::string xmlfile = XBMC_TEMPFILEPATH(file) |