OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
TestTape.h File Reference
#include <cassert>
#include <algorithm>
#include <functional>
#include <ostream>
#include <memory>
#include <utility>
#include <vector>
#include "AccessibleVector.h"

Classes

class  detail::TestTapeState< T >
 
class  detail::TestTapeBase< T >
 

Namespaces

namespace  detail
 

Typedefs

template<class T >
using TestTape = Accessible< detail::TestTapeBase< T > >
 
template<class T >
using TestMultiTape = TestTape< AccessibleVector< T > >
 

Functions

template<class T , class... Tail>
AccessibleVector< T > tape (T first, Tail... tail)
 
template<class T , class... Tail>
AccessibleVector< AccessibleVector< T > > tape (std::initializer_list< T > first, std::initializer_list< Tail >... tail)
 

Typedef Documentation

◆ TestMultiTape

template<class T >
using TestMultiTape = TestTape<AccessibleVector<T> >

◆ TestTape

template<class T >
using TestTape = Accessible<detail::TestTapeBase<T> >

Function Documentation

◆ tape() [1/2]

template<class T , class... Tail>
AccessibleVector< AccessibleVector< T > > tape ( std::initializer_list< T >  first,
std::initializer_list< Tail >...  tail 
)

Same as the other tape overload, but for per-character tapes.

Example code:

EXPECT_EQ(expTape.frontBack(), tape({100, 100, 100, 100}, {254, 250, 254, 254}));
EXPECT_EQ(toString(TestFlags()), "0")
AccessibleVector< T > tape(T first, Tail... tail)
Definition: TestTape.h:74

◆ tape() [2/2]

template<class T , class... Tail>
AccessibleVector< T > tape ( first,
Tail...  tail 
)

Shortcut function to create vectors that can then be compared with TestTape objects inside the EXPECT_EQ and ASSERT_EQ gtest macros.

Example code:

EXPECT_EQ(strengthTape, tape(2, 4, 6)); // Two +2 strength barrels.