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

Method testRowCountValueLabelsDateTime

tests/backend/Column/ColumnTest.cpp:1990–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1988}
1989
1990void ColumnTest::testRowCountValueLabelsDateTime() {
1991 Column c(QStringLiteral("Test"), Column::ColumnMode::DateTime);
1992 c.addValueLabel(QDateTime::fromString(QStringLiteral("2018-03-26T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs), QStringLiteral("Status 1"));
1993 c.addValueLabel(QDateTime::fromString(QStringLiteral("2018-03-27T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs), QStringLiteral("Status 2"));
1994 c.addValueLabel(QDateTime::fromString(QStringLiteral("2018-03-28T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs), QStringLiteral("Status 3"));
1995 c.addValueLabel(QDateTime::fromString(QStringLiteral("2018-03-30T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs), QStringLiteral("Status 4"));
1996 c.addValueLabel(QDateTime::fromString(QStringLiteral("2018-03-31T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs), QStringLiteral("Status 5"));
1997
1998 QCOMPARE(c.valueLabelsCount(QDateTime::fromString(QStringLiteral("2018-03-27T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs).toMSecsSinceEpoch(),
1999 QDateTime::fromString(QStringLiteral("2018-03-30T02:14:34.000Z"), Qt::DateFormat::ISODateWithMs).toMSecsSinceEpoch()),
2000 3);
2001}
2002
2003QTEST_MAIN(ColumnTest)

Callers

nothing calls this directly

Calls 2

addValueLabelMethod · 0.45
valueLabelsCountMethod · 0.45

Tested by

no test coverage detected