From 20cccfa67f0266fb6aa914c3fd3bd37d68c19d07 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Fri, 25 Sep 2015 18:44:36 +0900 Subject: [PATCH] Change tests per RFC 246 (const vs static) --- src/test/auxiliary/sepcomp_cci_lib.rs | 3 +-- src/test/auxiliary/xcrate_static_addresses.rs | 3 --- src/test/run-pass/sepcomp-cci.rs | 12 ++++++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/test/auxiliary/sepcomp_cci_lib.rs b/src/test/auxiliary/sepcomp_cci_lib.rs index d62b98714026b..c57d161d8f574 100644 --- a/src/test/auxiliary/sepcomp_cci_lib.rs +++ b/src/test/auxiliary/sepcomp_cci_lib.rs @@ -13,5 +13,4 @@ pub fn cci_fn() -> usize { 1200 } -#[inline] -pub static CCI_STATIC: usize = 34; +pub const CCI_CONST: usize = 34; diff --git a/src/test/auxiliary/xcrate_static_addresses.rs b/src/test/auxiliary/xcrate_static_addresses.rs index 652f11a71ec6f..d0da80e31b913 100644 --- a/src/test/auxiliary/xcrate_static_addresses.rs +++ b/src/test/auxiliary/xcrate_static_addresses.rs @@ -8,13 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[inline(never)] pub static global: isize = 3; -#[inline(never)] static global0: isize = 4; -#[inline(never)] pub static global2: &'static isize = &global0; pub fn verify_same(a: &'static isize) { diff --git a/src/test/run-pass/sepcomp-cci.rs b/src/test/run-pass/sepcomp-cci.rs index a1c5ad113c76d..d3d3de0e2c0cb 100644 --- a/src/test/run-pass/sepcomp-cci.rs +++ b/src/test/run-pass/sepcomp-cci.rs @@ -16,23 +16,23 @@ extern crate sepcomp_cci_lib; -use sepcomp_cci_lib::{cci_fn, CCI_STATIC}; +use sepcomp_cci_lib::{cci_fn, CCI_CONST}; fn call1() -> usize { - cci_fn() + CCI_STATIC + cci_fn() + CCI_CONST } mod a { - use sepcomp_cci_lib::{cci_fn, CCI_STATIC}; + use sepcomp_cci_lib::{cci_fn, CCI_CONST}; pub fn call2() -> usize { - cci_fn() + CCI_STATIC + cci_fn() + CCI_CONST } } mod b { - use sepcomp_cci_lib::{cci_fn, CCI_STATIC}; + use sepcomp_cci_lib::{cci_fn, CCI_CONST}; pub fn call3() -> usize { - cci_fn() + CCI_STATIC + cci_fn() + CCI_CONST } }