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

Method integerMinimum

tests/backend/Column/ColumnTest.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void ColumnTest::integerMinimum() {
70 Column c(QStringLiteral("Integer column"), Column::ColumnMode::Integer);
71 c.setIntegers({-1, 2, 5});
72 QCOMPARE(c.properties(), Column::Properties::MonotonicIncreasing);
73 QCOMPARE(c.minimum(0, 2), -1);
74 QCOMPARE(c.minimum(1, 2), 2);
75
76 c.setIntegers({-1, -3, -4});
77 QCOMPARE(c.properties(), Column::Properties::MonotonicDecreasing);
78 QCOMPARE(c.minimum(0, 2), -4);
79 QCOMPARE(c.minimum(1, 2), -4);
80
81 c.setIntegers({-1, 2, -4});
82 QCOMPARE(c.properties(), Column::Properties::NonMonotonic);
83 QCOMPARE(c.minimum(0, 2), -4);
84 QCOMPARE(c.minimum(0, 1), -1);
85}
86
87void ColumnTest::integerMaximum() {
88 Column c(QStringLiteral("Integer column"), Column::ColumnMode::Integer);

Callers

nothing calls this directly

Calls 3

setIntegersMethod · 0.80
propertiesMethod · 0.45
minimumMethod · 0.45

Tested by

no test coverage detected