Changeset 0b9be4d


Ignore:
Timestamp:
Oct 20, 2017, 5:04:11 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4ee1efb
Parents:
88e79ad
Message:

Update multiDimension test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/multiDimension.c

    r88e79ad r0b9be4d  
    3232}
    3333
    34 X global[10][10] = {
    35   { 1, { 2 }, { 3 }, { 4 }, 5, 6, 7, 8, 9, 10, 11, 12 },
    36   { 1, 2, 3, 4 },
    37   { { 1234567 } }
    38 };
     34// X global[10][10] = {
     35//   { 1, { 2 }, { 3 }, { 4 }, 5, 6, 7, 8, 9, 10, 11, 12 },
     36//   { 1, 2, 3, 4 },
     37//   { { 1234567 } }
     38// };
    3939
    40 X global2[3][3][3] = {
    41   {
    42     { 1, 2, 3 },
    43     { 4, 5, 6 },
    44     { 7, 8, 9 },
    45     { 10, 11, 12 }
    46   },
    47   {
    48     { 0, 0, 0 }
    49   }
    50 };
     40// X global2[3][3][3] = {
     41//   {
     42//     { 1, 2, 3 },
     43//     { 4, 5, 6 },
     44//     { 7, 8, 9 },
     45//     { 10, 11, 12 }
     46//   },
     47//   {
     48//     { 0, 0, 0 }
     49//   }
     50// };
    5151
    52 int foo() {
    53   static X abc[3][3] = {
    54     { 11, 22, 33, 44 },
    55     { 55, 66 },
    56     { 77 },
    57     { 88, 99, 1010 }
    58   };
    59 }
     52// int foo() {
     53//   static X abc[3][3] = {
     54//     { 11, 22, 33, 44 },
     55//     { 55, 66 },
     56//     { 77 },
     57//     { 88, 99, 1010 }
     58//   };
     59// }
    6060
    6161// ensure constructed const arrays continue to compile
    62 const int global[1] = { -2 };
     62// const int global[1] = { -2 };
    6363
    6464int main() {
    65   X abc[4][4] = {
    66     { 999, 1111 },
    67     { 1, 2, 3, 4, 5 },
    68     {},
    69     { 0 },
    70     { 88 }
    71   };
     65  X a;
     66  X abc[2];
     67  // X abc[4]/*[4]*/ = {
     68  //   /*{*/ 999, 1111 /*}*/,
     69  //   // { 1, 2, 3, 4, 5 },
     70  //   // {},
     71  //   // { 0 },
     72  //   // { 88 }
     73  // };
    7274
    73   foo();
    74   foo();
     75  // foo();
     76  // foo();
    7577}
Note: See TracChangeset for help on using the changeset viewer.