gccrs: testsuite: Add empty string macro test

Add two new tests with empty string for include_str and include_bytes
macros.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-1830_bytes.rs: New test.
	* rust/compile/issue-1830_str.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
This commit is contained in:
Pierre-Emmanuel Patry
2023-02-09 18:24:42 +01:00
committed by Arthur Cohen
parent b56d093e95
commit 7b00a80c9d
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#[rustc_builtin_macro]
macro_rules! include_bytes {
() => {{}};
}
fn main() {
include_bytes!(""); // { dg-excess-errors "Is a directory" }
}

View File

@@ -0,0 +1,8 @@
#[rustc_builtin_macro]
macro_rules! include_str {
() => {{}};
}
fn main() {
include_str!(""); // { dg-excess-errors "Is a directory" }
}