openMSX
Functions | Variables
TclObject_test.cc File Reference
#include "catch.hpp"
#include "Interpreter.hh"
#include "TclObject.hh"
#include "view.hh"
#include <cstdint>
#include <cstring>
#include <iterator>
#include <string>
Include dependency graph for TclObject_test.cc:

Go to the source code of this file.

Functions

 TEST_CASE ("TclObject, constructors")
 
 TEST_CASE ("TclObject, assignment")
 
 TEST_CASE ("TclObject, operator=")
 
 TEST_CASE ("TclObject, addListElement")
 
 TEST_CASE ("TclObject, addListElements")
 
t addDictKeyValue ("one", 1)
 
 CHECK (t.getDictValue(interp, "one").getInt(interp)==1)
 
 CHECK (t.getDictValue(interp, "two").getString()=="")
 
 CHECK (t.getDictValue(interp, "three").getString()=="")
 
t addDictKeyValues ("two", 2, "three", 3.14)
 
 CHECK (t.getDictValue(interp, "two").getInt(interp)==2)
 
 CHECK (t.getDictValue(interp, "three").getDouble(interp)==3.14)
 
t addDictKeyValues ("four", false, "one", "een")
 
 CHECK (t.getDictValue(interp, "one").getString()=="een")
 
 CHECK (t.getDictValue(interp, "four").getBoolean(interp)==false)
 
 TEST_CASE ("TclObject, getXXX")
 
 TEST_CASE ("TclObject, getDictValue")
 
 TEST_CASE ("TclObject, STL interface on Tcl list")
 
 TEST_CASE ("TclObject, evalBool")
 
 TEST_CASE ("TclObject, executeCommand")
 
 TEST_CASE ("TclObject, operator==, operator!=")
 

Variables

TclObject t
 

Function Documentation

◆ addDictKeyValue()

t addDictKeyValue ( "one"  ,
 
)

◆ addDictKeyValues() [1/2]

t addDictKeyValues ( "two"  ,
,
"three"  ,
3.  14 
)

◆ addDictKeyValues() [2/2]

t addDictKeyValues ( "four"  ,
false  ,
"one"  ,
"een"   
)

◆ CHECK() [1/7]

CHECK ( t.  getDictValueinterp, "one").getInt(interp = =1)

Referenced by TEST_CASE().

◆ CHECK() [2/7]

CHECK ( t.  getDictValueinterp, "two").getString( = ="")

◆ CHECK() [3/7]

CHECK ( t.  getDictValueinterp, "three").getString( = ="")

◆ CHECK() [4/7]

CHECK ( t.  getDictValueinterp, "two").getInt(interp = =2)

◆ CHECK() [5/7]

CHECK ( t.  getDictValueinterp, "three").getDouble(interp = =3.14)

◆ CHECK() [6/7]

CHECK ( t.  getDictValueinterp, "one").getString( = ="een")

◆ CHECK() [7/7]

CHECK ( t.  getDictValueinterp, "four").getBoolean(interp = =false)

◆ TEST_CASE() [1/11]

TEST_CASE ( TclObject,
constructors"   
)

◆ TEST_CASE() [2/11]

TEST_CASE ( TclObject,
assignment"   
)

Definition at line 88 of file TclObject_test.cc.

References CHECK(), and openmsx::TclObject::getString().

◆ TEST_CASE() [3/11]

TEST_CASE ( TclObject)

◆ TEST_CASE() [4/11]

TEST_CASE ( TclObject,
addListElement"   
)

◆ TEST_CASE() [5/11]

TEST_CASE ( TclObject,
addListElements"   
)

◆ TEST_CASE() [6/11]

TEST_CASE ( TclObject,
getXXX"   
)

◆ TEST_CASE() [7/11]

TEST_CASE ( TclObject,
getDictValue"   
)

◆ TEST_CASE() [8/11]

TEST_CASE ( TclObject,
STL interface on Tcl list"   
)

◆ TEST_CASE() [9/11]

TEST_CASE ( TclObject,
evalBool"   
)

Definition at line 376 of file TclObject_test.cc.

References CHECK().

◆ TEST_CASE() [10/11]

TEST_CASE ( TclObject,
executeCommand"   
)

◆ TEST_CASE() [11/11]

TEST_CASE ( TclObject,
operator  = = 
)

Definition at line 397 of file TclObject_test.cc.

References CHECK().

Variable Documentation

◆ t

Initial value:

Definition at line 264 of file TclObject_test.cc.

Referenced by opt_impl::swap_ns::adl_swap(), openmsx::XmlInputArchive::attributeImpl(), strCatImpl::calcTotalSizeHelper(), openmsx::Completer::completeFileName(), strCatImpl::ConcatUnit< T >::ConcatUnit(), opt_impl::constexpr_forward(), opt_impl::constexpr_move(), strCatImpl::ConcatViaString::copy(), strCatImpl::copyUnitsHelper(), openmsx::DivModBySame::div(), openmsx::DMKDiskImage::DMKDiskImage(), openmsx::XMLLoader::XMLElementParser::doctype(), openmsx::DBParser::doctype(), openmsx::InputArchiveBase< XmlInputArchive >::doSerialize(), HexDump::encode(), Endian::EndianT< T, Op >::EndianT(), EqualTupleValue(), cstd::exp(), openmsx::VDPCmdEngine::getBorderX(), openmsx::DMKDiskImage::getNbSectorsImpl(), openmsx::serialize_as_pointer< T * >::getPointer(), openmsx::V9990::getPriorityControlX(), openmsx::V9990::getPriorityControlY(), openmsx::V9990::getRollMask(), openmsx::HD::getTigerTreeHash(), openmsx::DoubledFrame::init(), openmsx::PolymorphicInitializer< Archive, T >::init(), openmsx::PolymorphicSaverRegistry< Archive >::instance(), view::keys(), openmsx::MemInputArchive::load(), openmsx::XmlInputArchive::load(), strCatImpl::makeConcatUnit(), openmsx::MemoryOps::mallocAligned(), openmsx::MB89352::MB89352(), gl::norm2_2(), Endian::EndianT< T, Op >::operator T(), hash_set_impl::Identity::operator()(), openmsx::detail::GetArg< optional< T > >::operator()(), Endian::Ident::operator()(), EqualTupleValueImpl< N, T >::operator()(), openmsx::MapConstrArgsCopy< Base, Derived >::operator()(), strCatImpl::AbsHelper< true >::operator()(), strCatImpl::AbsHelper< false >::operator()(), openmsx::ClassSaver< T >::operator()(), openmsx::ConditionalNegate< true >::operator()(), openmsx::ConditionalNegate< false >::operator()(), openmsx::ClassLoader< T >::operator()(), uint128::operator*=(), Endian::EndianT< T, Op >::operator=(), openmsx::Sha1Sum::parse40(), openmsx::Paper::plot(), cb_queue< std::unique_ptr< openmsx::Frame > >::pop_front(), circular_buffer< std::unique_ptr< openmsx::Frame > >::push_back(), circular_buffer< std::unique_ptr< openmsx::Frame > >::push_front(), openmsx::PolymorphicInitializerRegistry< Archive >::registerClass(), openmsx::ResampleCoeffs::releaseCoeffs(), openmsx::SchedulerQueue< openmsx::SynchronizationPoint >::remove_all(), openmsx::AY8910::reset(), openmsx::Scale_2on1< Pixel >::Scale_2on1(), openmsx::MSXCommandEvent::serialize(), openmsx::InputArchiveBase< XmlInputArchive >::serialize(), openmsx::MemOutputArchive::serialize(), openmsx::MemInputArchive::serialize(), openmsx::OutputArchiveBase< MemOutputArchive >::serializeInlinedBase(), openmsx::InputArchiveBase< XmlInputArchive >::serializePointerID(), openmsx::DivModBySame::setDivisor(), openmsx::DBParser::stop(), strAppend(), strCat(), openmsx::GlobalCommandController::tabCompletion(), TEST_CASE(), openmsx::RenderSettings::transformRGB(), openmsx::InfoCommand::unregisterTopic(), view::values(), openmsx::WD33C93::WD33C93(), openmsx::NinjaTap::write(), openmsx::DACSound16S::writeDAC(), openmsx::RP5C01::writePort(), openmsx::YMF278::writeReg(), openmsx::AY8910::writeRegister(), openmsx::DMKDiskImage::writeTrackImpl(), openmsx::AviWriter::~AviWriter(), openmsx::MSXtar::~MSXtar(), openmsx::ResampleHQ< CHANNELS >::~ResampleHQ(), and openmsx::ReverseManager::~ReverseManager().