mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Add some tests.
This commit is contained in:
parent
12db52ee64
commit
1a340dec26
13
sourcepawn/compiler/tests/fail-ctor-bad-return-type.sp
Normal file
13
sourcepawn/compiler/tests/fail-ctor-bad-return-type.sp
Normal file
@ -0,0 +1,13 @@
|
||||
native Float:CreateHandle(count);
|
||||
native CloseHandle(Handle:handle);
|
||||
|
||||
methodmap Handle {
|
||||
public Handle = CreateHandle;
|
||||
public Close = CloseHandle;
|
||||
};
|
||||
|
||||
public main() {
|
||||
new Handle:handle = Handle(3);
|
||||
handle.Close();
|
||||
}
|
||||
|
||||
1
sourcepawn/compiler/tests/fail-ctor-bad-return-type.txt
Normal file
1
sourcepawn/compiler/tests/fail-ctor-bad-return-type.txt
Normal file
@ -0,0 +1 @@
|
||||
constructor function must return tag Handle
|
||||
8
sourcepawn/compiler/tests/fail-duplicate-methods.sp
Normal file
8
sourcepawn/compiler/tests/fail-duplicate-methods.sp
Normal file
@ -0,0 +1,8 @@
|
||||
native X:Crab();
|
||||
methodmap X {
|
||||
public X = Crab;
|
||||
public X = Crab;
|
||||
}
|
||||
|
||||
public main() {
|
||||
}
|
||||
1
sourcepawn/compiler/tests/fail-duplicate-methods.txt
Normal file
1
sourcepawn/compiler/tests/fail-duplicate-methods.txt
Normal file
@ -0,0 +1 @@
|
||||
X was already defined on this methodmap
|
||||
Loading…
Reference in New Issue
Block a user