コード例 #1
0
int main(int argc, char **argv)
{
  ScopedXPCOM xpcom("nsTObserverArrayTests");
  if (xpcom.failed()) {
    return 1;
  }

  int rv = 0;

  Array arr;
  arr.AppendElement(3);
  arr.AppendElement(4);

  size_t count;
  int testNum = 0;

  // Basic sanity
  static int test1Expected[] = { 3, 4 };
  DO_TEST(ForwardIterator, test1Expected, );

  // Appends
  static int test2Expected[] = { 3, 4, 2 };
  DO_TEST(ForwardIterator, test2Expected,
          if (count == 1) arr.AppendElement(2);
          );