Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
teaching
nswi098
Cecko
skeleton
Commits
55e35cda
Commit
55e35cda
authored
Oct 23, 2020
by
Bednárek David RNDr. Ph.D.
Browse files
Changed output format, new tests.
parent
5191d958
Changes
7
Hide whitespace changes
Inline
Side-by-side
test/test1.cecko3.gold
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
...
...
@@ -20,10 +25,12 @@ int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
...
...
test/test1.cecko4.gold
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
...
...
@@ -20,10 +25,12 @@ int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
...
...
test/test1.cecko5.gold
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
...
...
@@ -20,10 +25,12 @@ int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
...
...
test/test2typedef.cecko2.gold
0 → 100644
View file @
55e35cda
========== cecko2 done ==========
test/test2typedef.cecko3.gold
0 → 100644
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
enum En{
ALPHA=0,
BETA=729,
GAMMA=730
};
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
typedef enum En ent;
typedef struct Str*str_ptr;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
void fibtest();
const char*front(struct Str**);
struct Str*get_str();
int main(int,char**);
void*memset(void*,int,int);
void pointerarithmeticstest();
void pop_front(struct Str**);
int printf(const char*,...);
void push_front(struct Str**,const char*);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
void test_enum();
enum En test_enum_internal(enum En);
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
enum En my_var;
struct _file_s*myout;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
}
_Bool empty(struct Str**rootp){
}
int fib(int x){
int s;
}
void fibtest(){
int n;
int s;
}
const char*front(struct Str**rootp){
}
struct Str*get_str(){
struct Str*p;
}
int main(int argc,char**argv){
}
void pointerarithmeticstest(){
char arr[27];
char ch;
char*e;
char*p;
}
void pop_front(struct Str**rootp){
}
void push_front(struct Str**rootp,const char*key){
struct Str*p;
}
void stringtest(){
char arr[100];
int i;
char t[40];
}
_Bool test(){
}
void test_enum(){
enum En x;
}
enum En test_enum_internal(enum En arg){
enum En tmp;
}
========== cecko3 done ==========
test/test2typedef.cecko4.gold
0 → 100644
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
enum En{
ALPHA=0,
BETA=729,
GAMMA=730
};
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
typedef enum En ent;
typedef struct Str*str_ptr;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
void fibtest();
const char*front(struct Str**);
struct Str*get_str();
int main(int,char**);
void*memset(void*,int,int);
void pointerarithmeticstest();
void pop_front(struct Str**);
int printf(const char*,...);
void push_front(struct Str**,const char*);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
void test_enum();
enum En test_enum_internal(enum En);
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
enum En my_var;
struct _file_s*myout;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
}
_Bool empty(struct Str**rootp){
}
int fib(int x){
int s;
}
void fibtest(){
int n;
int s;
}
const char*front(struct Str**rootp){
}
struct Str*get_str(){
struct Str*p;
}
int main(int argc,char**argv){
}
void pointerarithmeticstest(){
char arr[27];
char ch;
char*e;
char*p;
}
void pop_front(struct Str**rootp){
}
void push_front(struct Str**rootp,const char*key){
struct Str*p;
}
void stringtest(){
char arr[100];
int i;
char t[40];
}
_Bool test(){
}
void test_enum(){
enum En x;
}
enum En test_enum_internal(enum En arg){
enum En tmp;
}
========== starting main() ==========
This is test1.c main()
... argreverttest ...
sizeof(struct Str) = 16
argv[0] is "test2typedef.c"
popped "test2typedef.c"
... test_enum ...
x=0, my_var=729
... fibtest ...
fib(20) returned 6765
... stringtest ...
sprintf: 1 text
sscanf: 1 text
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
... pointerarithmeticstest ...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
========== main() returned 0 ==========
========== cecko4 done ==========
test/test2typedef.cecko5.gold
0 → 100644
View file @
55e35cda
========== tables ==========
// --- ENUMS ---
enum En{
ALPHA=0,
BETA=729,
GAMMA=730
};
// --- STRUCTS ---
struct Str{
const char*key;
struct Str*next;
};
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
typedef enum En ent;
typedef struct Str*str_ptr;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
void fibtest();
const char*front(struct Str**);
struct Str*get_str();
int main(int,char**);
void*memset(void*,int,int);
void pointerarithmeticstest();
void pop_front(struct Str**);
int printf(const char*,...);
void push_front(struct Str**,const char*);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
void test_enum();
enum En test_enum_internal(enum En);
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
enum En my_var;
struct _file_s*myout;
struct Str*root;
_Bool status;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
}
_Bool empty(struct Str**rootp){
}
int fib(int x){
int s;
}
void fibtest(){
int n;
int s;
}
const char*front(struct Str**rootp){
}
struct Str*get_str(){
struct Str*p;
}
int main(int argc,char**argv){
}
void pointerarithmeticstest(){
char arr[27];
char ch;
char*e;
char*p;
}
void pop_front(struct Str**rootp){
}
void push_front(struct Str**rootp,const char*key){
struct Str*p;
}
void stringtest(){
char arr[100];
int i;
char t[40];
}
_Bool test(){
}
void test_enum(){
enum En x;
}
enum En test_enum_internal(enum En arg){
enum En tmp;
}
========== starting main() ==========
This is test1.c main()
... argreverttest ...
sizeof(struct Str) = 16
argv[0] is "test2typedef.c"
popped "test2typedef.c"
... test_enum ...
x=0, my_var=729
... fibtest ...
fib(20) returned 6765
... stringtest ...
sprintf: 1 text
sscanf: 1 text
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
... pointerarithmeticstest ...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
========== main() returned 0 ==========
========== cecko5 done ==========
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment