MRPT  2.0.4
Functions | Variables
CConfigFileMemory_unittest.cpp File Reference
#include <gtest/gtest.h>
#include <mrpt/config/CConfigFile.h>
#include <mrpt/config/CConfigFileMemory.h>
#include <mrpt/system/filesystem.h>
#include <cstdlib>
#include <fstream>
Include dependency graph for CConfigFileMemory_unittest.cpp:

Go to the source code of this file.

Functions

 TEST (CConfigFileMemory, readwrite)
 
 TEST (CConfigFileMemory, Sections)
 
 TEST (CConfigFileMemory, Names)
 
 TEST (CConfigFileMemory, setFromString)
 
 TEST (CConfigFileMemory, readMultiLineStrings)
 
 TEST (CConfigFile, readMultiLineStrings)
 
 TEST (CConfigFileMemory, parseVariables)
 

Variables

const std::string sampleCfgTxt
 
const std::string expectedStr
 

Function Documentation

◆ TEST() [1/7]

TEST ( CConfigFileMemory  ,
readwrite   
)

Definition at line 17 of file CConfigFileMemory_unittest.cpp.

References mrpt::config::CConfigFileBase::read_string(), and mrpt::config::CConfigFileBase::write().

Here is the call graph for this function:

◆ TEST() [2/7]

TEST ( CConfigFileMemory  ,
Sections   
)

Definition at line 25 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), mrpt::config::CConfigFileMemory::getAllSections(), and mrpt::config::CConfigFileBase::write().

Here is the call graph for this function:

◆ TEST() [3/7]

TEST ( CConfigFileMemory  ,
Names   
)

Definition at line 40 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), EXPECT_TRUE(), mrpt::config::CConfigFileMemory::getAllKeys(), mrpt::config::CConfigFileBase::keyExists(), names, mrpt::config::CConfigFileBase::sectionExists(), and mrpt::config::CConfigFileBase::write().

Here is the call graph for this function:

◆ TEST() [4/7]

TEST ( CConfigFileMemory  ,
setFromString   
)

Definition at line 63 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), sampleCfgTxt, and mrpt::config::CConfigFileMemory::setContent().

Here is the call graph for this function:

◆ TEST() [5/7]

TEST ( CConfigFileMemory  ,
readMultiLineStrings   
)

Definition at line 90 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), expectedStr, mrpt::config::CConfigFileBase::read_string(), sampleCfgTxt, and mrpt::config::CConfigFileMemory::setContent().

Here is the call graph for this function:

◆ TEST() [6/7]

TEST ( CConfigFile  ,
readMultiLineStrings   
)

Definition at line 99 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), EXPECT_TRUE(), expectedStr, mrpt::system::getTempFileName(), out, mrpt::config::CConfigFileBase::read_string(), and sampleCfgTxt.

Here is the call graph for this function:

◆ TEST() [7/7]

TEST ( CConfigFileMemory  ,
parseVariables   
)

Definition at line 116 of file CConfigFileMemory_unittest.cpp.

References EXPECT_EQ(), EXPECT_NEAR(), mrpt::config::CConfigFileBase::read_double(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), and mrpt::config::CConfigFileMemory::setContent().

Here is the call graph for this function:

Variable Documentation

◆ expectedStr

const std::string expectedStr
Initial value:
= std::string(
"this is a long value that can be split into several lines but read as a "
"single line.")

Definition at line 86 of file CConfigFileMemory_unittest.cpp.

Referenced by TEST().

◆ sampleCfgTxt

const std::string sampleCfgTxt
Initial value:
=
"[test]\n"
"key_str = this is a \\\n"
"long value that can be \\\n"
"split into several lines \\\n"
"but read as a single line. \n"

Definition at line 79 of file CConfigFileMemory_unittest.cpp.

Referenced by TEST().




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020