Allow base destructors to run and fix some error reporting.

This commit is contained in:
David Anderson
2014-06-21 12:27:04 -07:00
parent 63ad5eff18
commit 861953d736
6 changed files with 434 additions and 397 deletions
@@ -0,0 +1,10 @@
native Handle:CreateHandle();
methodmap Handle {
public Handle() = CreateHandle;
};
public main() {
new Handle:handle = Handle();
delete handle;
}
@@ -0,0 +1 @@
methodmap Handle has no destructor; delete cannot be used
+15
View File
@@ -0,0 +1,15 @@
native Handle:CreateHandle(count);
native CloseHandle(Handle:handle);
methodmap Handle {
public Handle() = CreateHandle;
public ~Handle() = CloseHandle;
};
methodmap Crab < Handle {
};
public main() {
new Crab:crab;
delete crab;
}
+1 -1
View File
@@ -42,7 +42,7 @@ def run_tests(args):
if status == 'ok' and kind != 'pass':
with open(os.path.join(testdir, test + '.txt')) as fp:
text = fp.read()
text = fp.read().strip()
if text not in stdout:
print('Expected to find text in stdout: >>>')
print(text)