aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-11-05 03:10:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-11-05 03:10:20 +0000
commit43f5f92e2a121877d9b0828c7ae24d6c07c1bfe4 (patch)
treeb96c7e09d28efaaf8e5527dd44bfd7d0736ea84e
parent9d0ac0c4550c5a6b0cfe71216b51f29de0b0795e (diff)
parente15500305d220e3391832584dc76a335ac066b93 (diff)
downloadpaste-43f5f92e2a121877d9b0828c7ae24d6c07c1bfe4.tar.gz
Replace env!("...") expressions am: ece47a2b47 am: e15500305d
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/paste/+/1485240 Change-Id: I722d162af6655a203742d65eb3fde89cddaec925
-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;
}