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

Method loadDoubleFromProject

tests/backend/Column/ColumnTest.cpp:806–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804}
805
806void ColumnTest::loadDoubleFromProject() {
807 Project project;
808 project.load(QFINDTESTDATA(QLatin1String("data/Load.lml")));
809
810 auto* doublespreadSheet = project.child<AbstractAspect>(0);
811 QVERIFY(doublespreadSheet != nullptr);
812 QCOMPARE(doublespreadSheet->name(), QLatin1String("Double"));
813 QCOMPARE(doublespreadSheet->type(), AspectType::Spreadsheet);
814
815 auto childs = doublespreadSheet->children(AspectType::Column);
816 QVERIFY(childs.count() >= 1);
817 auto* doubleColumn = static_cast<Column*>(childs.at(0));
818 QCOMPARE(doubleColumn->columnMode(), AbstractColumn::ColumnMode::Double);
819 QCOMPARE(doubleColumn->rowCount(), 100);
820 const double doubleValues[] = {0.625,
821 1,
822 1,
823 4,
824 1.125,
825 1.66666666666667,
826 11,
827 6,
828 2.16666666666667,
829 14,
830 1.5,
831 2.28571428571429,
832 2.125,
833 2,
834 1.9,
835 2,
836 3.5,
837 22,
838 2.3,
839 2.66666666666667,
840 5,
841 26,
842 3,
843 4,
844 4.14285714285714,
845 3.33333333333333,
846 10.3333333333333,
847 32,
848 8.25,
849 3.4,
850 8.75,
851 5.14285714285714,
852 9.25,
853 6.33333333333333,
854 4.33333333333333,
855 4.44444444444444,
856 4.55555555555556,
857 4.2,
858 6.14285714285714,
859 5.5,
860 7.5,
861 46,
862 4.7,
863 12,

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
valueAtMethod · 0.45

Tested by

no test coverage detected