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

Method testParserPython02

tests/notebook/NotebookTest.cpp:81–92  ·  view source on GitHub ↗

! read a tuple of doubles */

Source from the content-addressed store, hash-verified

79 read a tuple of doubles
80*/
81void NotebookTest::testParserPython02() {
82 QString input = QStringLiteral("(1.0, 2.0)");
83 VariableParser parser(QStringLiteral("python"), input);
84
85 QCOMPARE(parser.isParsed(), true);
86 QCOMPARE(parser.dataType(), AbstractColumn::ColumnMode::Double);
87
88 const auto values = parser.doublePrecision();
89 QCOMPARE(values.size(), 2);
90 QCOMPARE(values.at(0), 1.0);
91 QCOMPARE(values.at(1), 2.0);
92}
93
94/*!
95 read a set of doubles

Callers

nothing calls this directly

Calls 3

isParsedMethod · 0.80
dataTypeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected