remove harmful createPIPair()

This commit is contained in:
2024-05-06 19:22:22 +03:00
parent 491d89f117
commit d4a024ea75
2 changed files with 49 additions and 18 deletions

View File

@@ -9,7 +9,6 @@
using namespace PICoutManipulators;
int main(int argc, char * argv[]) {
/*PISerial ser;
ser.setSpeed(PISerial::S115200);
@@ -18,9 +17,54 @@ int main(int argc, char * argv[]) {
ser.startThreadedRead();
(2_s).sleep();
ser.stopAndWait();*/
PISet<int> set = {1, 3, 4};
set |= PISet<int>{2, 4};
set -= PISet<int>{2};
piCout << set << (set & PISet<int>{1, 2, 4});
/*auto test = [](PISystemTime t) {
piCout << "---------------";
piCout << t << t.toString();
piCout << PISystemTime::fromString(t.toString()) << PISystemTime::fromString(t.toString()).toString();
piCout << PIVariant(t);
piCout << PIVariant(t).toString();
};
auto test_str = [](PIString s) {
piCout << "---------------";
piCout << s;
piCout << PISystemTime::fromString(s) << PISystemTime::fromString(s).toString();
};
test(PISystemTime::current());
test(1000.123_d);
test(61_s);
test(59_s);
test(1234_us);
test(5000001_ns);
test_str("");
test_str("2020-05-04");
test_str("2020-05-04 11:12:13");
test_str("11:12:13");
test_str("11:12:13.405");
test_str("100");
test_str("5 s");
test_str("5s");
test_str("1000 d 2 h 57 m 7 s 200 ms 2 ns");
test_str("0.2 d");
test_str(".5d");
test_str("3E+2us");
test_str("0.1d 200millis");
test_str("2h 15 seconds");
test_str("4secs 2hours 100 ns 3m 5ms 1 day 6 micros ");
test_str("1hz");
test_str("5.123khz");
test_str("5khz 123 hz");
test_str("2mhz");
test_str("1ghz");
test_str("1hz 1hz");*/
// PIPair<int, PIString> p = createPIPair(0, "");
PIVector<PIPair<int, PIString>> pv;
pv << createPIPair(0, PIString());
return 0;
}