Beispiel #1
0
        public static void TestStringEqualRoundTrip(ERational obj)
        {
            string    str    = obj.ToString();
            ERational newobj = ERational.FromString(str);
            string    str2   = newobj.ToString();

            TestCommon.AssertEqualsHashCode(obj, newobj);
            TestCommon.AssertEqualsHashCode(str, str2);
        }
Beispiel #2
0
        public static void TestStringEqualRoundTrip(ERational obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException(nameof(obj));
            }
            string    str    = obj.ToString();
            ERational newobj = ERational.FromString(str);

            if (str.Length < 100 || !obj.Equals(newobj))
            {
                TestCommon.AssertEqualsHashCode(obj, newobj);
                string str2 = newobj.ToString();
                TestCommon.AssertEqualsHashCode(str, str2);
            }
        }