Changeset 8a78dd3 for src/tests


Ignore:
Timestamp:
Nov 27, 2017, 4:17:28 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
8a0a64d9
Parents:
56de6b39 (diff), a16a7ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/polymorphism.c

    r56de6b39 r8a78dd3  
    4747        S s;
    4848        s.i = i;
    49         assert(s.i == i);
     49        assertf(s.i == i, "struct operation fails in polymorphic context.");
    5050
    5151        B b;
     
    7373        {
    7474                // test aggregates with polymorphic members
    75                 typedef uint32_t x_type;
    76                 typedef uint64_t y_type;
     75                typedef __attribute__((aligned(8))) uint32_t x_type;
     76                typedef __attribute__((aligned(8))) uint64_t y_type;
    7777
    7878                x_type x = 3;
     
    8989                // ensure that the size of aggregates with polymorphic members
    9090                // matches the size of the aggregates in a monomorphic context
    91                 assert( struct_size(x, y) == sizeof(S) );
    92                 assert( union_size(x, y) == sizeof(U) );
     91                assertf( struct_size(x, y) == sizeof(S), "struct size differs in polymorphic context." );
     92                assertf( union_size(x, y) == sizeof(U), "union size differs in polymorphic context." );
    9393
    9494                y_type ?=?(y_type & this, zero_t) {
     
    111111                u.f2 = 0;
    112112                u.f1 = x;
    113                 assert(ret == u.f2);
     113                assertf(ret == u.f2, "union operation fails in polymorphic context.");
    114114        }
    115115}
Note: See TracChangeset for help on using the changeset viewer.