Gromacs  2025-dev-20240910-a7e2421
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::test::anonymous_namespace{symtab.cpp} Namespace Reference

Functions

bool entriesAreEqual (t_symtab *symtab, char **symbol, int index)
 Helper that compares an input to a handle obtained from symtab lookup. More...
 
void compareSymtabLookupAndHandle (t_symtab *symtab, char **symbol)
 Helper function to check internal consistency of symtab lookup. More...
 
void compareDifferentHandles (t_symtab *symtab, char **firstSymbol, char **otherSymbol, bool expectedOutcome)
 Check that symbols obtained from symtab compare correctly. More...
 

Function Documentation

void gmx::test::anonymous_namespace{symtab.cpp}::compareDifferentHandles ( t_symtab *  symtab,
char **  firstSymbol,
char **  otherSymbol,
bool  expectedOutcome 
)

Check that symbols obtained from symtab compare correctly.

Helper function to find out if two entries obtained by a symtab lookup are equivalent or not, according to testing criteria.

Parameters
[in]symtabSymbol table that contains the entries.
[in]firstSymbolHandle into symtab obtained from placing string in symtab.
[in]otherSymbolOther handle from obtained from separate string deposit.
[in]expectedOutcomeIf the handles should result in equal entries or not.
void gmx::test::anonymous_namespace{symtab.cpp}::compareSymtabLookupAndHandle ( t_symtab *  symtab,
char **  symbol 
)

Helper function to check internal consistency of symtab lookup.

Checks that placing an entry resulted in valid symbol table, and that the index obtained from a call to lookup_symtab returns the correct entry.

Parameters
[in]symtabSymbol table that contains the entries.
[in]symbolThe entry obtained from placing a string in the symbol table.
bool gmx::test::anonymous_namespace{symtab.cpp}::entriesAreEqual ( t_symtab *  symtab,
char **  symbol,
int  index 
)

Helper that compares an input to a handle obtained from symtab lookup.

Parameters
[in]symtabSymbol table that contains the entries.
[in]symbolThe entry obtained from placing a string in the symbol table.
[in]indexIndex into symtab corresponding to an entry.
Returns
Whether to symbol and the entry returned by index are the same pointer.