Skip to content

Commit

Permalink
update testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
trdthg committed Jul 10, 2024
1 parent 86193df commit 042ae04
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
32 changes: 21 additions & 11 deletions test/format/default/operator.expect
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,51 @@ $include <prelude.sail>
*/
//* 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
};
Expand Down
24 changes: 14 additions & 10 deletions test/format/operator.sail
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,36 @@ $include <prelude.sail>
//* 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
Expand Down

0 comments on commit 042ae04

Please sign in to comment.