MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / stlarray2

Method stlarray2

test/testsymboldatabase.cpp:689–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687 }
688
689 void stlarray2() {
690 GET_SYMBOL_DB("constexpr int sz = 16; std::array<int, sz + 4> arr;");
691 ASSERT(db != nullptr);
692
693 ASSERT_EQUALS(3, db->variableList().size()); // the first one is not used
694 const Variable * v = db->getVariableFromVarId(2);
695 ASSERT(v != nullptr);
696
697 ASSERT(v->isArray());
698 ASSERT_EQUALS(1U, v->dimensions().size());
699 ASSERT_EQUALS(20U, v->dimension(0));
700 }
701
702 void stlarray3() {
703 GET_SYMBOL_DB("std::array<int, 4> a;\n"

Callers

nothing calls this directly

Calls 2

isArrayMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected