aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-11-05 03:39:25 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-11-05 03:39:25 +0000
commitbd8257b72f2d519d1bac208791e4619e6b88ee7e (patch)
treeb96c7e09d28efaaf8e5527dd44bfd7d0736ea84e
parenta9ca089256509f030ee9921458c31083f6fa4c81 (diff)
parent43f5f92e2a121877d9b0828c7ae24d6c07c1bfe4 (diff)
downloadpaste-bd8257b72f2d519d1bac208791e4619e6b88ee7e.tar.gz
Replace env!("...") expressions am: ece47a2b47 am: e15500305d am: 43f5f92e2a
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/paste/+/1485240 Change-Id: I9b0a44dcd15b79d03ad882f98112dcde514e1626
-rw-r--r--tests/test_expr.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_expr.rs b/tests/test_expr.rs
index 8c0cc28..e8386d0 100644
--- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ -82,7 +82,7 @@ fn test_env_literal() {
#[test]
fn test_env_present() {
paste! {
- struct [<Lib env!("CARGO_PKG_NAME")>];
+ struct [<Lib "paste">];
let _ = Libpaste;
}
@@ -137,7 +137,7 @@ fn test_empty() {
#[test]
fn test_env_to_lower() {
paste! {
- struct [<Lib env!("CARGO_PKG_NAME"):lower>];
+ struct [<Lib "paste":lower>];
let _ = Libpaste;
}
@@ -146,7 +146,7 @@ fn test_env_to_lower() {
#[test]
fn test_env_to_upper() {
paste! {
- const [<LIB env!("CARGO_PKG_NAME"):upper>]: &str = "libpaste";
+ const [<LIB "paste":upper>]: &str = "libpaste";
let _ = LIBPASTE;
}
@@ -155,7 +155,7 @@ fn test_env_to_upper() {
#[test]
fn test_env_to_snake() {
paste! {
- const [<LIB env!("CARGO_PKG_NAME"):snake:upper>]: &str = "libpaste";
+ const [<LIB "paste":snake:upper>]: &str = "libpaste";
let _ = LIBPASTE;
}
@@ -165,7 +165,7 @@ fn test_env_to_snake() {
fn test_env_to_camel() {
paste! {
#[allow(non_upper_case_globals)]
- const [<LIB env!("CARGO_PKG_NAME"):camel>]: &str = "libpaste";
+ const [<LIB "paste":camel>]: &str = "libpaste";
let _ = LIBPaste;
}