xlld.test.util

Utility test functions

Members

Functions

excel12UnitTest
int excel12UnitTest(int xlfn, int numOpers, XLOPER12** opers, XLOPER12* result)
fromExcel
void fromExcel(auto ref A args)

Mimics Excel calling a particular D function, including freeing memory

shouldEqualDlang
void shouldEqualDlang(XLOPER12* actual, U expected, string file = __FILE__, size_t line = __LINE__)

automatically converts from oper to compare with a D type

shouldEqualDlang
void shouldEqualDlang(ref XLOPER12 actual, U expected, string file = __FILE__, size_t line = __LINE__)

automatically converts from oper to compare with a D type

shouldEqualDlang
void shouldEqualDlang(XLOPER12 actual, U expected, string file = __FILE__, size_t line = __LINE__)

automatically converts from oper to compare with a D type

toSRef
XLOPER12 toSRef(T val, ref A allocator)

Manifest constants

maxAllocTrack
enum maxAllocTrack;

Structs

AA
struct AA(K, V, int N = 100)

@nogc associative array

TestAllocator
struct TestAllocator

tracks allocations and throws in the destructor if there is a memory leak it also throws when there is an attempt to deallocate memory that wasn't allocated

Variables

gAllocated
const(void)*[maxAllocTrack] gAllocated;
gFreed
const(void)*[maxAllocTrack] gFreed;
gNumXlFree
int gNumXlFree;
gReferencedType
XlType gReferencedType;

emulates SRef types by storing what the referenced type actually is

gTestAllocator
TestAllocator gTestAllocator;
gXlFuncResults
XLOPER12[][XlFunction] gXlFuncResults;

This stores what Excel12f should "return" for each integer XL "function"

Meta