Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
single-context-tests.cc File Reference
#include <gtest/gtest.h>
#include "single-context.hh"
Include dependency graph for single-context-tests.cc:

Classes

class  SingleContextTests
 

Functions

 EXPECT_FALSE (context.try_get("int").has_value())
 
context set ("int", 3)
 
 EXPECT_EQ (std::any_cast< int >(context.get("int")), 3)
 
 EXPECT_EQ (std::any_cast< int >(context.try_get("int")), 3)
 
 EXPECT_THROW (context.set("int", 3), Context::name_exists)
 

Function Documentation

◆ EXPECT_EQ() [1/2]

EXPECT_EQ ( std::any_cast< int >  context.get("int"),
 
)

◆ EXPECT_EQ() [2/2]

EXPECT_EQ ( std::any_cast< int >  context.try_get("int"),
 
)

◆ EXPECT_FALSE()

EXPECT_FALSE ( context.  try_get"int").has_value()

◆ EXPECT_THROW()

EXPECT_THROW ( context.  set"int", 3,
Context::name_exists   
)

◆ set()

context set ( "int"  ,
 
)