MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / validate_controlStates

Function validate_controlStates

quest/src/core/validation.cpp:3667–3675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3665}
3666
3667void validate_controlStates(int* states, int numCtrls, const char* caller) {
3668
3669 // states is permittedly unallocated (nullptr) even when numCtrls != 0
3670 if (!mem_isAllocated(states))
3671 return;
3672
3673 for (int n=0; n<numCtrls; n++)
3674 assertThat(states[n] == 0 || states[n] == 1, report::INVALID_CONTROL_STATE, {{"${INDEX}", n}, {"${STATE}", states[n]}}, caller);
3675}
3676
3677void validate_controlsMatchStates(int numCtrls, int numStates, const char* caller) {
3678

Calls 2

mem_isAllocatedFunction · 0.85
assertThatFunction · 0.85

Tested by

no test coverage detected