예제 #1
0
 public void TestComplement()
 {
     Assert.AreEqual(~15, Ops.Complement(15));
     Assert.AreEqual(true, Ops.Complement(false));
     Assert.AreEqual(false, Ops.Complement(true));
     Assert.AreEqual(~new BigInteger(15), Ops.Complement(new BigInteger(15)));
     Assert.AreEqual(~15, Ops.Complement <MyInt, int>(new MyInt(15)));
 }
예제 #2
0
 public static Var <E> operator ~(Var <E> value) => Ops.Complement(value.Value);