blob: 514acebd783ee989037f368a51bd60c0312fc7a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# test syntax errors specific to viper code generation
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
# viper: annotations must be identifiers
test_syntax("@micropython.viper\ndef f(a:1): pass")
test_syntax("@micropython.viper\ndef f() -> 1: pass")
|