MCPcopy Create free account
hub / github.com/KDE/labplot / loadIntegerFromProject

Method loadIntegerFromProject

tests/backend/Column/ColumnTest.cpp:924–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924void ColumnTest::loadIntegerFromProject() {
925 Project project;
926 project.load(QFINDTESTDATA(QLatin1String("data/Load.lml")));
927
928 auto* integerSpreadsheet = project.child<AbstractAspect>(1);
929 QVERIFY(integerSpreadsheet != nullptr);
930 QCOMPARE(integerSpreadsheet->name(), QLatin1String("Integer"));
931 QCOMPARE(integerSpreadsheet->type(), AspectType::Spreadsheet);
932
933 auto childs = integerSpreadsheet->children(AspectType::Column);
934 QVERIFY(childs.count() >= 1);
935 auto* integerColumn = static_cast<Column*>(childs.at(0));
936 QCOMPARE(integerColumn->columnMode(), AbstractColumn::ColumnMode::Integer);
937 QCOMPARE(integerColumn->rowCount(), 133);
938 const int integerValues[133] = {291, 75, 21, 627, 163, 677, 712, 66, 733, 653, 502, 515, 379, 70, 762, 261, 304, 541, 298, 462, 623, 382, 94,
939 232, 679, 132, 124, 212, 122, 118, 486, 126, 107, 677, 386, 118, 731, 484, 638, 127, 779, 109, 708, 298, 680, 249,
940 591, 155, 351, 178, 70, 768, 2, 504, 179, 747, 789, 213, 144, 143, 61, 761, 113, 766, 18, 617, 406, 489, 299,
941 658, 326, 181, 773, 228, 653, 242, 382, 11, 267, 29, 283, 30, 251, 453, 699, 286, 739, 406, 729, 159, 506, 20,
942 766, 443, 646, 161, 545, 400, 160, 693, 722, 463, 121, 350, 194, 558, 503, 72, 516, 509, 118, 340, 342, 495, 50,
943 549, 643, 241, 248, 483, 408, 768, 634, 589, 159, 518, 475, 403, 165, 122, 268, 537, 33};
944 for (int i = 0; i < 133; i++)
945 QCOMPARE(integerColumn->integerAt(i), integerValues[i]);
946}
947
948void ColumnTest::loadBigIntegerFromProject() {
949 Project project;

Callers

nothing calls this directly

Calls 8

loadMethod · 0.45
nameMethod · 0.45
typeMethod · 0.45
childrenMethod · 0.45
countMethod · 0.45
columnModeMethod · 0.45
rowCountMethod · 0.45
integerAtMethod · 0.45

Tested by

no test coverage detected