Skip to content

Commit

Permalink
Add simlpe tests (KO)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frky committed Jul 26, 2016
1 parent a849062 commit 72538a0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/proto/src/float__float.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdlib.h>

// ORACLE FLOAT FOO(FLOAT)
// ORACLE FLOAT foo(FLOAT)

float foo(float a) {
float b;
Expand Down
2 changes: 1 addition & 1 deletion test/proto/src/float__void.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdlib.h>

// ORACLE VOID FOO(FLOAT)
// ORACLE VOID foo(FLOAT)

void foo(float a) {
float b;
Expand Down
2 changes: 1 addition & 1 deletion test/proto/src/int__float.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdlib.h>

// ORACLE FLOAT FOO(INT)
// ORACLE FLOAT foo(INT)

float foo(int a) {
float b;
Expand Down
4 changes: 2 additions & 2 deletions test/proto/src/int__int.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdlib.h>

// ORACLE INT FOO(INT)
// ORACLE INT foo(INT)

int foo(int a) {
int b;
Expand All @@ -19,7 +19,7 @@ int main(void) {

int a = 0, i;

for (i=0; i < 10000; i++) {
for (i=0; i < 1000; i++) {
a += foo(rand() % 65536);
}

Expand Down
2 changes: 1 addition & 1 deletion test/proto/src/int__void.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void foo(int b) {
int main(void) {
int i;
for (i = 0; i < rand() % 65536; i++)
foo(rand());
foo(rand() % 65536);
return 0;
}

10 changes: 7 additions & 3 deletions test/proto/src/void__int.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdlib.h>

// ORACLE INT FOO(VOID)
// ORACLE INT foo(VOID)

int foo(void) {
int a, b;
Expand All @@ -18,8 +18,12 @@ int foo(void) {

int main(void) {

int a = foo();
int b = foo();
int a, b, i;

for (i = 0; i < 100; i++) {
a = foo();
b = foo();
}

return a + b;
}

0 comments on commit 72538a0

Please sign in to comment.