Example #1
0
  static void NoModifiesWithJoin(ModifiesInformation a, bool b)
  {
    if (b)
    {
    }
    else
    {
    }
    string tmpx = a.next.x; // should be unmodified
    string tmpy = a.next.y; // should be unmodified

    Contract.Assert(tmpx != null); // should result in a pre-condition suggestion
    Contract.Assert(tmpy != null); // should result in a pre-condition suggestion
  }
Example #2
0
    static void NoModifiesWithJoin(ModifiesInformation a, bool b)
    {
        if (b)
        {
        }
        else
        {
        }
        string tmpx = a.next.x;        // should be unmodified
        string tmpy = a.next.y;        // should be unmodified

        Contract.Assert(tmpx != null); // should result in a pre-condition suggestion
        Contract.Assert(tmpy != null); // should result in a pre-condition suggestion
    }
Example #3
0
    void ModifiesOnBranch2(bool b)
    {
        if (b)
        {
            this.next = new ModifiesInformation();
        }
        else
        {
        }
        string tmpx = this.next.x;     // should be modified
        string tmpy = this.next.y;     // should be modified

        Contract.Assert(tmpx != null); // should NOT result in a pre-condition suggestion
        Contract.Assert(tmpy != null); // should NOT result in a pre-condition suggestion
    }
Example #4
0
  void ModifiesOnBranch2(bool b)
  {
    if (b)
    {
      this.next = new ModifiesInformation();
    }
    else
    {
    }
    string tmpx = this.next.x; // should be modified
    string tmpy = this.next.y; // should be modified

    Contract.Assert(tmpx != null); // should NOT result in a pre-condition suggestion
    Contract.Assert(tmpy != null); // should NOT result in a pre-condition suggestion
  }