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

Method testParserPython01

tests/notebook/NotebookTest.cpp:65–76  ·  view source on GitHub ↗

Python ! read a list of doubles */

Source from the content-addressed store, hash-verified

63 read a list of doubles
64*/
65void NotebookTest::testParserPython01() {
66 QString input = QStringLiteral("[1.0, 2.0]");
67 VariableParser parser(QStringLiteral("python"), input);
68
69 QCOMPARE(parser.isParsed(), true);
70 QCOMPARE(parser.dataType(), AbstractColumn::ColumnMode::Double);
71
72 const auto values = parser.doublePrecision();
73 QCOMPARE(values.size(), 2);
74 QCOMPARE(values.at(0), 1.0);
75 QCOMPARE(values.at(1), 2.0);
76}
77
78/*!
79 read a tuple of doubles

Callers

nothing calls this directly

Calls 3

isParsedMethod · 0.80
dataTypeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected