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

Method testParserPython04

tests/notebook/NotebookTest.cpp:113–124  ·  view source on GitHub ↗

np.ones(2, dtype=np.int16)

Source from the content-addressed store, hash-verified

111
112// np.ones(2, dtype=np.int16)
113void NotebookTest::testParserPython04() {
114 QString input = QStringLiteral("array([1, 1], dtype=int16)");
115 VariableParser parser(QStringLiteral("python"), input);
116
117 QCOMPARE(parser.isParsed(), true);
118 QCOMPARE(parser.dataType(), AbstractColumn::ColumnMode::Integer);
119
120 const auto values = parser.integers();
121 QCOMPARE(values.size(), 2);
122 QCOMPARE(values.at(0), 1);
123 QCOMPARE(values.at(1), 1);
124}
125
126// np.ones((2,2), dtype=np.int16)
127void NotebookTest::testParserPython05() {

Callers

nothing calls this directly

Calls 3

isParsedMethod · 0.80
dataTypeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected