diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-03-04 06:32:36 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-03-04 06:32:36 +0800 |
commit | 3e1363e8af41d5ac431a9e27ee023a3035c8a6dd (patch) | |
tree | 8a7dec558c125cc2235c16e873defdab1e6cf361 | |
parent | 0e0659a51a838bd3f89732530fa9871f680ccc28 (diff) | |
download | dexon-mcl-3e1363e8af41d5ac431a9e27ee023a3035c8a6dd.tar.gz dexon-mcl-3e1363e8af41d5ac431a9e27ee023a3035c8a6dd.tar.zst dexon-mcl-3e1363e8af41d5ac431a9e27ee023a3035c8a6dd.zip |
add test for isZero, isOne
-rw-r--r-- | ffi/cs/Program.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ffi/cs/Program.cs b/ffi/cs/Program.cs index 0646601..961388a 100644 --- a/ffi/cs/Program.cs +++ b/ffi/cs/Program.cs @@ -439,9 +439,11 @@ namespace mcl { Console.WriteLine("TestFr");
Fr x = new Fr();
x.Clear();
- Console.WriteLine("x = {0}", x);
+ Console.WriteLine("x = {0}, isZero = {1}, isOne = {2}", x, x.IsZero(), x.IsOne());
+ x.SetInt(1);
+ Console.WriteLine("x = {0}, isZero = {1}, isOne = {2}", x, x.IsZero(), x.IsOne());
x.SetInt(3);
- Console.WriteLine("x = {0}", x);
+ Console.WriteLine("x = {0}, isZero = {1}, isOne = {2}", x, x.IsZero(), x.IsOne());
x.SetInt(-5);
Console.WriteLine("x = {0}", x);
x = -x;
|