-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwords_test.c
45 lines (40 loc) · 1.75 KB
/
words_test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; -*-
*
* Copyright (c) 2008 Jeremy English <[email protected]>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* Created: 04-November-2008
*/
#include <stdlib.h>
#include <stdio.h>
#include "words.h"
int main(int argc, char **argv){
IndexWord *treep;
treep = NULL;
treep = insert_word(treep, new_index_word("this"), 1);
treep = insert_word(treep, new_index_word("this"), 1);
treep = insert_word(treep, new_index_word("this"), 2);
treep = insert_word(treep, new_index_word("this"), 3);
treep = insert_word(treep, new_index_word("this"), 3);
treep = insert_word(treep, new_index_word("this"), 3);
treep = insert_word(treep, new_index_word("is"), 1);
treep = insert_word(treep, new_index_word("is"), 1);
treep = insert_word(treep, new_index_word("a"), 2);
treep = insert_word(treep, new_index_word("a"), 2);
treep = insert_word(treep, new_index_word("a"), 3);
treep = insert_word(treep, new_index_word("a"), 4);
treep = insert_word(treep, new_index_word("a"), 3);
treep = insert_word(treep, new_index_word("a"), 3);
treep = insert_word(treep, new_index_word("test"), 1);
printf("Printing Word Tree\n");
printf("------------------------------------------------------------\n");
print_word_tree(treep);
return 1;
}