From 9b3d806b0dbfcf76ff707aa86daba83454227720 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 3 Feb 2018 22:34:35 +0300 Subject: Add infra for inline tests --- tests/data/parser/inline/0001_const_unsafe_fn.rs | 1 + tests/data/parser/inline/0001_const_unsafe_fn.txt | 15 +++++++++++++++ tests/data/parser/inline/0002_const_fn.rs | 1 + tests/data/parser/inline/0002_const_fn.txt | 13 +++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 tests/data/parser/inline/0001_const_unsafe_fn.rs create mode 100644 tests/data/parser/inline/0001_const_unsafe_fn.txt create mode 100644 tests/data/parser/inline/0002_const_fn.rs create mode 100644 tests/data/parser/inline/0002_const_fn.txt (limited to 'tests/data/parser/inline') diff --git a/tests/data/parser/inline/0001_const_unsafe_fn.rs b/tests/data/parser/inline/0001_const_unsafe_fn.rs new file mode 100644 index 000000000..31a1e435f --- /dev/null +++ b/tests/data/parser/inline/0001_const_unsafe_fn.rs @@ -0,0 +1 @@ +const unsafe fn foo() {} diff --git a/tests/data/parser/inline/0001_const_unsafe_fn.txt b/tests/data/parser/inline/0001_const_unsafe_fn.txt new file mode 100644 index 000000000..1f0865cb0 --- /dev/null +++ b/tests/data/parser/inline/0001_const_unsafe_fn.txt @@ -0,0 +1,15 @@ +FILE@[0; 25) + FN_ITEM@[0; 25) + CONST_KW@[0; 5) + WHITESPACE@[5; 6) + UNSAFE_KW@[6; 12) + WHITESPACE@[12; 13) + FN_KW@[13; 15) + WHITESPACE@[15; 16) + IDENT@[16; 19) "foo" + L_PAREN@[19; 20) + R_PAREN@[20; 21) + WHITESPACE@[21; 22) + L_CURLY@[22; 23) + R_CURLY@[23; 24) + WHITESPACE@[24; 25) diff --git a/tests/data/parser/inline/0002_const_fn.rs b/tests/data/parser/inline/0002_const_fn.rs new file mode 100644 index 000000000..8c84d9cd7 --- /dev/null +++ b/tests/data/parser/inline/0002_const_fn.rs @@ -0,0 +1 @@ +const fn foo() {} diff --git a/tests/data/parser/inline/0002_const_fn.txt b/tests/data/parser/inline/0002_const_fn.txt new file mode 100644 index 000000000..2d360d78b --- /dev/null +++ b/tests/data/parser/inline/0002_const_fn.txt @@ -0,0 +1,13 @@ +FILE@[0; 18) + FN_ITEM@[0; 18) + CONST_KW@[0; 5) + WHITESPACE@[5; 6) + FN_KW@[6; 8) + WHITESPACE@[8; 9) + IDENT@[9; 12) "foo" + L_PAREN@[12; 13) + R_PAREN@[13; 14) + WHITESPACE@[14; 15) + L_CURLY@[15; 16) + R_CURLY@[16; 17) + WHITESPACE@[17; 18) -- cgit v1.2.3