#include <stdio.h>
#include<ctype.h>
#include <string.h>

extern int countVowels(char *input);

extern char *yourName;
extern char *yourStudentID;
static void testcode();

int main(void)
{
  testcode();
  return 0;
}

static void testcode (void)
{
	char s1[100];
	int a;
	int	total=1;

	printf ("ICS 51 lab2 (Winter 2005)\nName:      %s\nStudentID: %s\n",   yourName, yourStudentID);
// test #1 
    strcpy(s1, "Don't forget to comment your source code!");
	a  = countVowels(s1);
	if (a==13)
	{
		total=total+2;
        printf("CORRECT-Test1: \nInput string = %s\n Number of vowels = %d , total=%d\n\n", s1, a, total);
	}
	else
		printf("INCORRECT-Test1: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);

// test #2 
	strcpy(s1, "Everything should be made as simple as possible, but no simpler!");
	a = countVowels(s1);
	if (a==19)
	{
		total=total+2;
        printf("CORRECT-Test2: \nInput string = %s\n Number of vowels = %d, total=%d \n\n", s1, a, total);
	}
	else
		printf("INCORRECT-Test2: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);


// test #3
	strcpy(s1, "Do only what only you can do!");
	a = countVowels(s1);
	if (a==8)
	{
		total=total+2;
		printf("CORRECT-Test3: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a,total);
	}
	else
		printf("INCORRECT-Test3: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);


// test #4
	strcpy(s1, " ");
	a = countVowels(s1);
	if (a==0)
	{
		total=total+2;
        printf("CORRECT-Test4: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);
	}
	else
		printf("INCORRECT-Test4: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);

// test #5
	strcpy(s1, "Aa Ee Ii Oo Uu");
	a = countVowels(s1);
	if (a==10)
	{
		total=total+2;
        printf("CORRECT-Test5: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);
	}
	else
		printf("INCORRECT-Test5: \nInput string = %s\n Number of vowels = %d, total=%d\n\n", s1, a, total);

}
