Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Add clone test case for "async" #609

Merged
merged 2 commits into from
Mar 13, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clone_tests/clone_compilation_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
"Unknown keyword, only `weak` and `strong` are allowed"),
("clone!(v => move || {})",
"You need to specify if this is a weak or a strong clone."),
("clone!(@strong v => async move {println!(\"foo\");});",
"no rules expected the token `async`"),
sdroege marked this conversation as resolved.
Show resolved Hide resolved
]


Expand Down Expand Up @@ -93,6 +95,8 @@ def run_test(code, expected_str):
continue
if compiler_message is None:
return "Weird issue: no compiler-message found..."
if expected_str == "":
return "failed: `{}`".format(compiler_message)
if expected_str not in compiler_message:
return "`{}` not found in `{}`".format(expected_str, compiler_message)
return None
Expand Down