add tests for variableIndex_t
constify