-
-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glue tests are no longer hard-coded to Rust
- Loading branch information
Showing
126 changed files
with
1,597 additions
and
1,439 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
app [makeGlue] { pf: platform "../platform/main.roc" } | ||
|
||
import pf.Types exposing [Types] | ||
# import pf.Shape exposing [Shape, RocFn] | ||
import pf.File exposing [File] | ||
# import pf.TypeId exposing [TypeId] | ||
|
||
makeGlue : List Types -> Result (List File) Str | ||
makeGlue = \_typesByArch -> | ||
Ok ([{ name: "roc_app.h", content: placeholderGlue }]) | ||
|
||
placeholderGlue = | ||
""" | ||
#ifndef ROC_APP_H | ||
#define ROC_APP_H | ||
#include <stdint.h> | ||
extern void roc__mainForHost_1_exposed_generic(uint8_t *ret); | ||
uint8_t roc_mainForHost() | ||
{ | ||
uint8_t ret; | ||
roc__mainForHost_1_exposed_generic(&ret); | ||
return ret; | ||
} | ||
#endif | ||
""" |
87 changes: 0 additions & 87 deletions
87
crates/glue/tests/fixtures/advanced-recursive-union/src/lib.rs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
92 changes: 0 additions & 92 deletions
92
crates/glue/tests/fixtures/basic-recursive-union/src/lib.rs
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
app [main] { pf: platform "platform.roc" } | ||
|
||
main = 42 |
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,14 @@ | ||
#include <stdio.h> | ||
#include <stdint.h> | ||
#include <assert.h> | ||
|
||
#include "test_glue/roc_app.h" | ||
|
||
int main(void) | ||
{ | ||
uint8_t mainForHost = roc_mainForHost(); | ||
|
||
printf("mainForHost = %i\n", mainForHost); | ||
|
||
assert(mainForHost == 42); | ||
} |
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,9 @@ | ||
platform "test-platform" | ||
requires {} { main : _ } | ||
exposes [] | ||
packages {} | ||
imports [] | ||
provides [mainForHost] | ||
|
||
mainForHost : U8 | ||
mainForHost = main |
Oops, something went wrong.