Commit c5ec471b authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

some declaration tests

parent 2775a391
......@@ -36,9 +36,19 @@ MAKE_TEST("2" "testsxa-typedef")
MAKE_TEST("3" "test1")
MAKE_TEST("3" "test2typedef")
MAKE_TEST("4" "test1")
MAKE_TEST("4" "test2typedef")
MAKE_TEST("5" "test1")
MAKE_TEST("5" "test2typedef")
MAKE_TEST("3" "testdecl-arr")
MAKE_TEST("3" "testdecl-enum")
MAKE_TEST("3" "testdecl-struct")
MAKE_TEST("3" "testdecl-typedef")
#MAKE_TEST("4" "test1")
#MAKE_TEST("4" "test2typedef")
#MAKE_TEST("5" "test1")
#MAKE_TEST("5" "test2typedef")
#MAKE_TEST("5" "testsxa-arr")
#MAKE_TEST("5" "testsxa-enum")
#MAKE_TEST("5" "testsxa-expr")
#MAKE_TEST("5" "testsxa-stmt")
#MAKE_TEST("5" "testsxa-struct")
#MAKE_TEST("5" "testsxa-typedef")
// array
int main(int argc, char** argv)
int arr[42];
int i, j;
int darr[4][2];
return 0;
// enum
enum days { MON, TUE, WED, THU, WRI, SAT=15, SUN };
int main(int argc, char** argv)
enum days day;
enum rgb { RED, GREEN, BLUE } color;
return 0;
// struct
struct mighty_str {
char c;
int x,y;
int x;
//void T(int);
int main(int argc, char** argv)
struct mighty_str ms;
//typedef int T;
struct mighty_str* ps;
struct god_str {
struct mighty_str ims_;
} gs;
struct god_str* ps;
return 0;
// testing TYPEIDF and typedef
//#include <stdio.h>
typedef enum En ent;
typedef struct Str* str_ptr;
int main(int argc, char** argv)
FILE * myout; // this is a declaration
str_ptr p;
ent* e;
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment