diff --git a/test/format/default/operator.expect b/test/format/default/operator.expect index 39f154483..df693b96b 100644 --- a/test/format/default/operator.expect +++ b/test/format/default/operator.expect @@ -7,41 +7,51 @@ $include */ //* line_block_comment */ infix 4 ===_u -infix 4 =/ infix 4 ===/_u infix 4 /=/=/=_u -infix 4 ===*_u +infix 4 ===*_u val operator ===/_u : forall 'n. (int('n), int('n)) -> bool function operator ===/_u(x, y) = x == y +infix 4 =/ val operator =/ : forall 'n. (int('n), int('n)) -> bool function operator =/(x, y) = x == y function f () = { - if eq2_comment == /**/ /**/ 1 then { + if op_eq2_with_block_comment == /**/ /**/ 1 then { 1 }; - if eq_slash =/ 1 then { + if op_eq_slash =/ 1 then { 1 }; - - let eq_comment = - /**/ 1; - - if defined_eq_slash =/ 1 then { + if op_eq_slash_with_block_comment =/ 1 then /**/ { 1 }; - let eq_comment = + let op_eq_with_line_comment = // 1; - let slash_comment = + let op_eq_with_line_comment = /// 1; + if op_eq_with_line_comment = + // then { 1 } this is commeny + if eq_slash = /**/ 1 then { + 1 + } else { + 2 + } then { + 1 + }; + + if eq_with_blcok_comment = /**/ 1 then { + 1 + }; + if eq3_slash ===/_u 1 then { 1 }; diff --git a/test/format/operator.sail b/test/format/operator.sail index e2fdd23c4..3b64ac118 100644 --- a/test/format/operator.sail +++ b/test/format/operator.sail @@ -12,32 +12,36 @@ $include //* line_block_comment */ infix 4 ===_u -infix 4 =/ infix 4 ===/_u infix 4 /=/=/=_u -infix 4 ===*_u +infix 4 ===*_u val operator ===/_u : forall 'n. (int('n), int('n)) -> bool function operator ===/_u(x, y) = x == y +infix 4 =/ val operator =/ : forall 'n. (int('n), int('n)) -> bool function operator =/(x, y) = x == y + function f () = { - if eq2_comment /**/==/**/ 1 then { 1 }; + if op_eq2_with_block_comment /**/==/**/ 1 then { 1 }; - if eq_slash =/1 then { 1 }; + if op_eq_slash =/1 then { 1 }; + if op_eq_slash_with_block_comment =/1/**/ then { 1 }; - let eq_comment =/**/ 1; - - if defined_eq_slash =/ 1 then { 1 }; - - let eq_comment =// + let op_eq_with_line_comment =// 1; - let slash_comment =/// + let op_eq_with_line_comment =/// 1; + if op_eq_with_line_comment =// then { 1 } this is commeny + (if eq_slash =/**/1 then { 1 } else {2}) then {1}; + + if eq_with_blcok_comment =/**/1 then { 1 }; + + if eq3_slash ===/_u 1 then { 1 }; 0