-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve diagnostics and add ui tests
- Loading branch information
1 parent
61613ca
commit f0f37c6
Showing
12 changed files
with
716 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[test] | ||
fn ui() { | ||
let t = trybuild::TestCases::new(); | ||
t.compile_fail("tests/ui/*.rs"); | ||
} |
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,30 @@ | ||
use spacetimedb::*; | ||
|
||
struct Test; | ||
|
||
#[spacetimedb(reducer)] | ||
fn bad_type(_a: Test) {} | ||
|
||
#[spacetimedb(reducer)] | ||
fn bad_return_type() -> Test { | ||
Test | ||
} | ||
|
||
#[spacetimedb(reducer)] | ||
fn bad_type_ctx(_ctx: ReducerContext, _a: Test) {} | ||
|
||
#[spacetimedb(reducer)] | ||
fn bad_return_type_ctx(_ctx: ReducerContext) -> Test { | ||
Test | ||
} | ||
|
||
#[spacetimedb(reducer)] | ||
fn lifetime<'a>(_a: &'a str) {} | ||
|
||
#[spacetimedb(reducer)] | ||
fn type_param<T>() {} | ||
|
||
#[spacetimedb(reducer)] | ||
fn const_param<const X: u8>() {} | ||
|
||
fn main() {} |
Oops, something went wrong.