GY-63_MS5611/libraries/Set/examples/equalTest/equalTest.ino

54 lines
1.1 KiB
Arduino
Raw Normal View History

2020-11-27 05:33:55 -05:00
//
// FILE: equalTest.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.1
// PURPOSE: demo equality operators
// DATE: 2014-11-09
// URL: https://github.com/RobTillaart/SET
//
// Released to the public domain
//
#include "set.h"
Set setA, setB;
volatile bool b;
void setup()
{
Serial.begin(115200);
Serial.print("Start set_demo : ");
Serial.println(SET_LIB_VERSION);
Serial.println();
Serial.println("\n\nequal test");
randomSeed(1);
setA.clr();
setB.clr();
Serial.println(setA == setB?"true":"false");
setB.add(0);
Serial.println(setA == setB?"true":"false");
Serial.println(setA == setA?"true":"false");
Set setC(setB);
Serial.println(setC == setB?"true":"false");
Serial.println(setC.count());
Set setD = setB;
Serial.println(setD != setB?"unequal":"equal");
Serial.println(setD == setB?"true":"false");
Serial.println(setD.count());
setD = setA;
Serial.println(setD == setB?"true":"false");
Serial.println(setD.count());
Serial.println("done...");
Serial.println();
}
void loop()
{
}