/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "dttest.h"
{ 0, sizeof(long), -1,
};
{ 0, sizeof(long), -1,
};
tmain()
{
/* testing Dtobag */
x = 5;
terror("Insert -- expected %ld, got %ld", x, g);
x = 2;
terror("Insert -- expected %ld, got %ld", x, g);
x = 5;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
x = 3;
terror("Insert -- expected %ld, got %ld", x, g);
x = 5;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
x = 4;
terror("Insert -- expected %ld, got %ld", x, g);
x = 1;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
x = 2;
terror("Insert -- expected %ld, got %ld", x, g);
x = 5;
terror("Insert -- expected %ld, got %ld", x, g);
x = 4;
terror("Insert -- expected %ld, got %ld", x, g);
x = 3;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
x = 4;
terror("Insert -- expected %ld, got %ld", x, g);
x = 5;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
x = 3;
terror("Insert -- expected %ld, got %ld", x, g);
x = 4;
terror("Insert -- expected %ld, got %ld", x, g);
if(i < k)
terror("Disorder %ld >= %ld", k, i);
for(i = 0; i <= 5; ++i)
count[i] = 0;
count[i] += 1;
for(i = 0; i <= 5; ++i)
if(count[i] != i)
for(i = 0; i <= 5; ++i)
count[i] = 0;
count[i] += 1;
for(i = 0; i <= 5; ++i)
if(count[i] != i)
if(i < k)
terror("Disorder %ld >= %ld", k, i);
terror("Bad element");
terror("Non empty dictionary after clearing");
for(i = 1; i <= 10; ++i)
for(k = 1; k <= 10; ++k)
terror("Can't insert k=%d at iteration %d", k, i);
k += 1;
if(k != 10)
terror("Did not see all 5's k=%d", k);
k += 1;
if(k != 10)
terror("Did not see all 3's k=%d", k);
texit(0);
}