Example #1
0
        public void StructInheritingFromInterfacePositive1()
        {
            EmptyIndexable <int> empty = new EmptyIndexable <int>();
            int x = empty.Count;

            Assert.AreEqual(0, x);
        }
Example #2
0
 public void StructInheritingFromInterfaceNegative1()
 {
   EmptyIndexable<int> empty = new EmptyIndexable<int>();
   try
   {
     int x = empty[0];
     throw new Exception();
   }
   catch (TestRewriterMethods.PreconditionException p)
   {
     Assert.Equal("index < this.Count", p.Condition);
   }
 }
Example #3
0
        public void StructInheritingFromInterfaceNegative1()
        {
            EmptyIndexable <int> empty = new EmptyIndexable <int>();

            try
            {
                int x = empty[0];
                throw new Exception();
            }
            catch (TestRewriterMethods.PreconditionException p)
            {
                Assert.AreEqual("index < this.Count", p.Condition);
            }
        }
Example #4
0
 public void StructInheritingFromInterfacePositive1()
 {
   EmptyIndexable<int> empty = new EmptyIndexable<int>();
   int x = empty.Count;
   Assert.Equal(0, x);
 }