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

Method testParserPython03

tests/notebook/NotebookTest.cpp:97–108  ·  view source on GitHub ↗

! read a set of doubles */

Source from the content-addressed store, hash-verified

95 read a set of doubles
96*/
97void NotebookTest::testParserPython03() {
98 QString input = QStringLiteral("{1.0, 2.0}");
99 VariableParser parser(QStringLiteral("python"), std::move(input));
100
101 QCOMPARE(parser.isParsed(), true);
102 QCOMPARE(parser.dataType(), AbstractColumn::ColumnMode::Double);
103
104 const auto values = parser.doublePrecision();
105 QCOMPARE(values.size(), 2);
106 QCOMPARE(values.at(0), 1.0);
107 QCOMPARE(values.at(1), 2.0);
108}
109
110// numpy data types
111

Callers

nothing calls this directly

Calls 3

isParsedMethod · 0.80
dataTypeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected