aboutsummaryrefslogtreecommitdiff
path: root/tests/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drivers')
-rw-r--r--tests/drivers/hint_fixes_test.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/drivers/hint_fixes_test.js b/tests/drivers/hint_fixes_test.js
index 20d3dd1..a388911 100644
--- a/tests/drivers/hint_fixes_test.js
+++ b/tests/drivers/hint_fixes_test.js
@@ -76,5 +76,9 @@ fixes('a misspelled local function is corrected', 'int count_items() { return 1;
'int count_items() { return 1; }\nfn main() {\n\treturn count_items();\n}\n', 'change to `count_items`');
fixes('a qualified name from a file library adds its include', 'include rt;\nfn main() {\n\treturn actor.vector();\n}\n', 'actor', 0,
'include rt;\ninclude actor;\nfn main() {\n\treturn actor.vector();\n}\n', 'include actor');
+fixes('a misspelled field is corrected', 'include rt;\nstruct point { int length, width; }\nfn main() {\n\tpoint* p = rt.new(point);\n\treturn p.lenght;\n}\n', 'lenght', 0,
+ 'include rt;\nstruct point { int length, width; }\nfn main() {\n\tpoint* p = rt.new(point);\n\treturn p.length;\n}\n', 'change to `length`');
+fixes('a misspelled static function of a library group is corrected', 'include rt;\ninclude std;\nfn main() {\n\treturn std.Text.itao(5, 0);\n}\n', 'itao', 0,
+ 'include rt;\ninclude std;\nfn main() {\n\treturn std.Text.itoa(5, 0);\n}\n', 'change to `itoa`');
console.log(ok + ' hint fix checks passed, ' + bad + ' failed');
process.exit(bad ? 1 : 0);