/* Stack testing program */
#include <stdio.h>
#include "stack.h"

int main()
{

/* Start testing with linked list implementation */
	// Push test
	pushL('a');
	pushL('b');
	pushL('c');
	pushL('d');
	pushL('e');

	// Pop test
	printf("%c\n", popL());
	printf("%c\n", popL());
	printf("%c\n", popL());
	printf("%c\n", popL());

	// Print test
	printStackL();

	// Top test 
	printf("%c\n", topL());

	// isEmpty test
	if (isEmptyL())
		printf("Stack is empty!\n");
	else
		printf("Stack is NOT empty!\n");

/* Next, test with array implementation */
	// Push test
	pushA('a');
	pushA('b');
	pushA('c');
	pushA('d');
	pushA('e');

	// Pop test
	printf("%c\n", popA());
	printf("%c\n", popA());
	printf("%c\n", popA());
	printf("%c\n", popA());

	// Print test
	printStackA();

	// Top test 
	printf("%c\n", topA());

	// isEmpty test
	if (isEmptyA())
		printf("Stack is empty!\n");
	else
		printf("Stack is NOT empty!\n");

	return 0;
}
