thejoeejoee / IFJ-VUT-BIT-2017-2018

Repository for program interpret of custom language IFJ2017 written in C tested under Google tests.
GNU General Public License v3.0
2 stars 3 forks source link

Boolean extension #65

Closed thejoeejoee closed 6 years ago

codecov[bot] commented 6 years ago

Codecov Report

Merging #65 into develop will increase coverage by 0.26%. The diff coverage is 100%.

Impacted Files Coverage Δ
src/parser_expr_rules.c 92.39% <100%> (+1.46%) :arrow_up:
src/parser_expr_internal.c 92.85% <100%> (+3.53%) :arrow_up:
src/parser_semantic.c 100% <100%> (ø) :arrow_up:
src/code_instruction_operand.c 94.03% <0%> (+0.66%) :arrow_up:
@@             Coverage Diff             @@
##           develop      #65      +/-   ##
===========================================
+ Coverage    96.49%   96.75%   +0.26%     
===========================================
  Files           48       48              
  Lines         4390     4436      +46     
===========================================
+ Hits          4236     4292      +56     
+ Misses         154      144      -10
thejoeejoee commented 6 years ago

Ještě mi tu pár věcí nesedí, @Aroidzap, především integrační testy:

08_booleans:
    01  (basic declaration with assignment):  × COMPILER EXIT CODE expected=0, returned=4
    02  (boolean operations): ✓✓ × STDOUT
    03  (assignment of boolean expressions):  × COMPILER EXIT CODE expected=0, returned=4
    04  (boolean functions):  × COMPILER EXIT CODE expected=0, returned=4

Vypadá to, že nezvládáme sémantiku pro not, ve 02 jsou rozdílné výsledky pro kód:

' boolean operations
scope
    dim a as boolean = True
    dim b as boolean = False
    dim c as boolean = False

    if b or c and a then
        print 1;
    else
        print 0;
    end if

    if b or (c and a) then
        print 0;
    else
        print 1;
    end if

    if False or (False and (False or (True or True))) then
        print 1;
    else
        print 0;
    end if
end scope

tisknout má 111 a aktuálně tiskne 010.

Mohl by jsi na to prosím kouknout ještě a dotáhnout to?