-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from elliotchance/future/126-tap
TAP tests. Fixes #126
- Loading branch information
Showing
49 changed files
with
1,565 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
/coverage.txt | ||
/c2go | ||
/.vscode | ||
*.coverprofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package linux | ||
|
||
import ( | ||
"math" | ||
|
||
"github.com/elliotchance/c2go/noarch" | ||
) | ||
|
||
func IsNanf(x float32) int { | ||
return noarch.BoolToInt(math.IsNaN(float64(x))) | ||
} | ||
|
||
func IsInff(x float32) int { | ||
return noarch.BoolToInt(math.IsInf(float64(x), 0)) | ||
} | ||
|
||
func IsInf(x float64) int { | ||
return noarch.BoolToInt(math.IsInf(x, 0)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package noarch | ||
|
||
import ( | ||
"math" | ||
) | ||
|
||
func Signbitf(x float32) int { | ||
return BoolToInt(math.Signbit(float64(x))) | ||
} | ||
|
||
func Signbitd(x float64) int { | ||
return BoolToInt(math.Signbit(x)) | ||
} | ||
|
||
func Signbitl(x float64) int { | ||
return BoolToInt(math.Signbit(x)) | ||
} | ||
|
||
func IsNaN(x float64) int { | ||
return BoolToInt(math.IsNaN(x)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
// This file contains tests for the system arguments (argv). | ||
|
||
#include <stdio.h> | ||
#include "tests.h" | ||
|
||
int main(int argc, char *argv[]) | ||
int main(int argc, const char **argv) | ||
{ | ||
int c; | ||
plan(3); | ||
|
||
printf("Number of command line arguments passed: %d\n", argc); | ||
is_eq(argc, 3); | ||
|
||
for (c = 1; c < argc; c++) | ||
printf("%d. Command line argument passed is %s\n", c + 1, argv[c]); | ||
// We cannot compare the zeroth argument becuase it will be different for C | ||
// and Go. | ||
// is_streq(argv[0], "build/go.out"); | ||
|
||
return 0; | ||
is_streq(argv[1], "some"); | ||
is_streq(argv[2], "args"); | ||
|
||
done_testing(); | ||
} |
Oops, something went wrong.