Changeset 810


Ignore:
Timestamp:
Jul 29, 2012 9:59:49 AM (12 years ago)
Author:
Anya Helene Bagge
Message:

<-> => ==

Location:
trunk/magnolia-tests/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/magnolia-tests/src/mutification/Mutification.mg

    r666 r810  
    2020                var tmp : Integer;
    2121                call two(tmp);
    22                 assert two() <-> tmp;
     22                assert two() == tmp;
    2323               
    2424                call four(tmp);
    25                 assert four() <-> tmp;
     25                assert four() == tmp;
    2626       
    2727                var fortytwo = (one() + one() + one() + one()) * ten() + one() + one();
     
    2929                call add(tmp, one());
    3030                call add(tmp, one());
    31                 assert fortytwo <-> tmp;
     31                assert fortytwo == tmp;
    3232        }
    3333}
  • trunk/magnolia-tests/src/override/Override.mg

    r655 r810  
    1818
    1919        procedure check() {
    20                 assert bar(zero()) <-> one() doc{should call procedure bar, returning one};
    21                 assert bar(one()) <-> one() doc{should call procedure bar, returning one};
    22                 assert bar(two()) <-> one() doc{should call procedure bar, returning one};
    23                 assert foo(zero()) <-> one() doc{should call default foo, calling function bar, returning one};
    24                 assert foo(one()) <-> one() doc{should call default foo, calling function bar, returning one};
    25                 assert foo(two()) <-> one() doc{should call default foo, calling function bar, returning one};
     20                assert bar(zero()) == one() doc{should call procedure bar, returning one};
     21                assert bar(one()) == one() doc{should call procedure bar, returning one};
     22                assert bar(two()) == one() doc{should call procedure bar, returning one};
     23                assert foo(zero()) == one() doc{should call default foo, calling function bar, returning one};
     24                assert foo(one()) == one() doc{should call default foo, calling function bar, returning one};
     25                assert foo(two()) == one() doc{should call default foo, calling function bar, returning one};
    2626                var x = one();
    2727                call bar(x);
    28                 assert x <-> one() doc{should call procedure bar, giving one};
     28                assert x == one() doc{should call procedure bar, giving one};
    2929        }
    3030}
     
    4040       
    4141        procedure check() {
    42                 assert bar(one()) <-> zero() doc{should call function bar, returning zero};
    43                 assert bar(zero()) <-> zero() doc{should call function bar, returning zero};
    44                 assert bar(two()) <-> zero() doc{should call function bar, returning zero};
    45                 assert foo(zero()) <-> zero() doc{should call default foo, calling bar, returning zero};
    46                 assert foo(one()) <-> zero() doc{should call default foo, calling bar, returning zero};
    47                 assert foo(two()) <-> zero() doc{should call default foo, calling bar, returning zero};
     42                assert bar(one()) == zero() doc{should call function bar, returning zero};
     43                assert bar(zero()) == zero() doc{should call function bar, returning zero};
     44                assert bar(two()) == zero() doc{should call function bar, returning zero};
     45                assert foo(zero()) == zero() doc{should call default foo, calling bar, returning zero};
     46                assert foo(one()) == zero() doc{should call default foo, calling bar, returning zero};
     47                assert foo(two()) == zero() doc{should call default foo, calling bar, returning zero};
    4848                var x = one();
    4949                call bar(x);
    50                 assert x <-> one() doc{should call procedure bar, giving one};
     50                assert x == one() doc{should call procedure bar, giving one};
    5151        }
    5252}
     
    6262       
    6363        procedure check() {
    64                 assert bar(zero()) <-> one() doc{should call procedure bar, returning one};
    65                 assert bar(one()) <-> one() doc{should call procedure bar, returning one};
    66                 assert bar(two()) <-> one() doc{should call procedure bar, returning one};
    67                 assert foo(zero()) <-> two() doc{should call default foo, calling bar, returning zero};
    68                 assert foo(one()) <-> two() doc{should call overridden foo, returning two};
    69                 assert foo(two()) <-> two() doc{should call overridden foo, calling bar, returning two};
     64                assert bar(zero()) == one() doc{should call procedure bar, returning one};
     65                assert bar(one()) == one() doc{should call procedure bar, returning one};
     66                assert bar(two()) == one() doc{should call procedure bar, returning one};
     67                assert foo(zero()) == two() doc{should call default foo, calling bar, returning zero};
     68                assert foo(one()) == two() doc{should call overridden foo, returning two};
     69                assert foo(two()) == two() doc{should call overridden foo, calling bar, returning two};
    7070                var x = one();
    7171                call bar(x);
    72                 assert x <-> one() doc{should call procedure bar, giving one};
     72                assert x == one() doc{should call procedure bar, giving one};
    7373        }
    7474}
  • trunk/magnolia-tests/src/toplevel/Operators.mg

    r744 r810  
    33axiom renamed(decls : \decllist, decl : \decl, renaming : \renaming) {
    44        assert decl in decls => decl[renaming] in decls[renaming];
     5}
     6
     7test testRenamed() {
     8        assert renamed(A, A.foo, [foo => bar]);
    59}
    610
     
    2226}
    2327
    24 test testRenamed() {
    25         assert renamed(A, A.foo, [foo => bar]);
    26 }
    27 
    2828concept A = {
    2929        procedure foo() { call foo(); }
  • trunk/magnolia-tests/src/toplevel/Renaming.mg

    r773 r810  
    11module toplevel.Renaming;
    2 
     2/*
    33concept A = {
    44        type A;
     
    4343        assert CDArenamed == CDArenamed2;
    4444}
     45
     46
     47implementation RenamingNameClash = {
     48        type T;
     49        function f(t : T) : T = t;
     50        function g(t : T) : T = f(t);
     51}[g => f]
     52*/
     53implementation Foo =
     54on signature {
     55        type U;
     56        function g(t : T) : T = f(t) ;
     57}[g => f]
     58defines {
     59//      function f(t : T) : T = f(t);
     60}
     61
     62implementation Bar = on {
     63        type T;
     64        function f(t : T) : T;
     65}
     66defines {} @ Baz[U => T]
     67
     68implementation Baz = on {
     69        type U;
     70        function f(t : U) : U;
     71}
     72defines {
     73        function g(t : U) : U = f(t);
     74}
     75
     76
     77implementation A = defines {
     78        type T;
     79        function f(t : T) : T = t;
     80        function g(t : T) : T = f(t);
     81}
     82
     83implementation B = (defines {
     84        type T;
     85        function f(t : T) : T = t;
     86        function g(t : T) : T = f(t);
     87       
     88})  + extend A
     89
     90/*
     91implementation C = defines {
     92        type T;
     93        function f(t : T) : T = t;
     94        function h(t : T) : T = t;
     95}
     96*/
Note: See TracChangeset for help on using the changeset viewer.