Ignore:
Timestamp:
May 17, 2021, 9:32:35 PM (8 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d286e94d
Parents:
02a43ff
Message:

Adding isListed accessor function to new linked list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/list/dlist-insert-remove.cfa

    r02a43ff rc2794b2  
    16071607}
    16081608
     1609void test__isListed_cases__mary() {
     1610
     1611        mary m1 = {1.7};        assert(! m1`isListed);
     1612        mary m2 = {2.7};        assert(! m2`isListed);
     1613        mary m3 = {3.7};        assert(! m3`isListed);
     1614
     1615        dlist(mary) ml;
     1616
     1617        insert_last(ml, m1);    assert(  m1`isListed);  assert(! m2`isListed);
     1618        insert_last(ml, m2);    assert(  m2`isListed);  assert(! m3`isListed);
     1619        insert_last(ml, m3);    assert(  m3`isListed);
     1620
     1621        remove( m1 );           assert(! m1`isListed);  assert(  m2`isListed);
     1622        remove( m2 );           assert(! m2`isListed);  assert(  m3`isListed);
     1623        remove( m3 );           assert(! m3`isListed);
     1624
     1625        printf("isListed cases done\n");
     1626}
     1627
    16091628////////////////////////////////////////////////////////////
    16101629//
     
    19041923        test__try_pop__mary();
    19051924        test__origin_mutation__mary();
     1925        test__isListed_cases__mary();
    19061926
    19071927        return 0;
Note: See TracChangeset for help on using the changeset viewer.