JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Test AST and Node functionality #249

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Relevant issues

Resolves #248

Summary

Basically, a lot of language functionality has not been tested. Seeing as the parser is less volatile now best to start testing all node substitutions since the type checker does make use of this. This should prevent funny behavior in the future.

Added Tests

codecov[bot] commented 2 years ago

Codecov Report

Merging #249 (210dd75) into develop (28917f3) will increase coverage by 2.35%. The diff coverage is 80.65%.

@@             Coverage Diff             @@
##           develop     #249      +/-   ##
===========================================
+ Coverage    80.92%   83.28%   +2.35%     
===========================================
  Files           99       99              
  Lines         8940     9328     +388     
===========================================
+ Hits          7235     7769     +534     
+ Misses        1705     1559     -146     
Impacted Files Coverage Δ
src/parse/ast/node.rs 77.23% <80.60%> (+49.88%) :arrow_up:
src/check/constrain/unify/expression/mod.rs 80.55% <100.00%> (ø)
src/parse/ast/mod.rs 100.00% <100.00%> (+32.56%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more