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

Method loadBigIntegerFromProject

tests/backend/Column/ColumnTest.cpp:948–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946}
947
948void ColumnTest::loadBigIntegerFromProject() {
949 Project project;
950 project.load(QFINDTESTDATA(QLatin1String("data/Load.lml")));
951
952 auto* bigIntegerSpreadsheet = project.child<AbstractAspect>(2);
953 QVERIFY(bigIntegerSpreadsheet != nullptr);
954 QCOMPARE(bigIntegerSpreadsheet->name(), QLatin1String("BigInteger"));
955 QCOMPARE(bigIntegerSpreadsheet->type(), AspectType::Spreadsheet);
956
957 auto childs = bigIntegerSpreadsheet->children(AspectType::Column);
958 QVERIFY(childs.count() >= 1);
959 auto* bigIntegerColumn = static_cast<Column*>(childs.at(0));
960 QCOMPARE(bigIntegerColumn->columnMode(), AbstractColumn::ColumnMode::BigInt);
961 QCOMPARE(bigIntegerColumn->rowCount(), 98);
962 const qint64 bigIntegerValues[] = {
963 423448954198, 5641410204, 30408827812, 28654888657, 49080407041, 49609860873, 3687941775, 19532027992, 35894087224, 5820636581, 28739047077,
964 13946526866, 36153607843, 3240340694, 2375891120, 3014999117, 17758738424, 31303772749, 36400461519, 29813286102, 14068980943, 24595715523,
965 390096547, 27927541822, 35442936843, 33577242277, 34966078315, 45550480998, 11834545810, 25714661808, 6979002160, 35138449350, 3597002515,
966 707044300, 27971594979, 25699976843, 35231282278, 11659858605, 45858935838, 25070072891, 15136182059, 6266852861, 42582813575, 23784333993,
967 14361566136, 27840747719, 41099229867, 40403331476, 21708972571, 10995493445, 36292237893, 4264327752, 45637575339, 13530360473, 40816873119,
968 15346300490, 30807486688, 23771858665, 36762855436, 351630653, 22270715573, 31792268673, 25001237450, 16558491573, 21771715873, 20963298299,
969 25197909817, 41130528918, 13134975803, 43222173019, 17071520882, 8356069280, 27671796182, 29309739294, 9377292482, 30451803959, 47318250898,
970 21100469009, 28764337224, 36898356693, 36091695104, 12019973504, 15605135996, 13711330940, 13010481591, 45193969649, 25444985954, 34831527437,
971 8208098526, 29897950771, 5631513384, 47590874807, 4659417951, 28338882094, 14853737313, 22965578753, 6544735402, 32209366817};
972 for (int i = 0; i < 98; i++)
973 QCOMPARE(bigIntegerColumn->bigIntAt(i), bigIntegerValues[i]);
974}
975
976void ColumnTest::loadTextFromProject() {
977 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
bigIntAtMethod · 0.45

Tested by

no test coverage detected