Skip to content

Commit c034d0c

Browse files
committed
test: Switch field privacy as necessary
1 parent abd7dd8 commit c034d0c

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

src/libtest/lib.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -147,30 +147,30 @@ impl TestFn {
147147
/// set-up & tear-down before running a piece of code repeatedly via a
148148
/// call to `iter`.
149149
pub struct BenchHarness {
150-
priv iterations: u64,
151-
priv ns_start: u64,
152-
priv ns_end: u64,
153-
bytes: u64
150+
iterations: u64,
151+
ns_start: u64,
152+
ns_end: u64,
153+
pub bytes: u64,
154154
}
155155

156156
// The definition of a single test. A test runner will run a list of
157157
// these.
158158
#[deriving(Clone)]
159159
pub struct TestDesc {
160-
name: TestName,
161-
ignore: bool,
162-
should_fail: bool
160+
pub name: TestName,
161+
pub ignore: bool,
162+
pub should_fail: bool,
163163
}
164164

165165
pub struct TestDescAndFn {
166-
desc: TestDesc,
167-
testfn: TestFn,
166+
pub desc: TestDesc,
167+
pub testfn: TestFn,
168168
}
169169

170170
#[deriving(Clone, Encodable, Decodable, Eq, Show)]
171171
pub struct Metric {
172-
priv value: f64,
173-
priv noise: f64
172+
value: f64,
173+
noise: f64
174174
}
175175

176176
impl Metric {
@@ -242,15 +242,15 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
242242
}
243243

244244
pub struct TestOpts {
245-
filter: Option<~str>,
246-
run_ignored: bool,
247-
run_tests: bool,
248-
run_benchmarks: bool,
249-
ratchet_metrics: Option<Path>,
250-
ratchet_noise_percent: Option<f64>,
251-
save_metrics: Option<Path>,
252-
test_shard: Option<(uint,uint)>,
253-
logfile: Option<Path>
245+
pub filter: Option<~str>,
246+
pub run_ignored: bool,
247+
pub run_tests: bool,
248+
pub run_benchmarks: bool,
249+
pub ratchet_metrics: Option<Path>,
250+
pub ratchet_noise_percent: Option<f64>,
251+
pub save_metrics: Option<Path>,
252+
pub test_shard: Option<(uint,uint)>,
253+
pub logfile: Option<Path>
254254
}
255255

256256
/// Result of parsing the options.
@@ -375,8 +375,8 @@ pub fn opt_shard(maybestr: Option<~str>) -> Option<(uint,uint)> {
375375

376376
#[deriving(Clone, Eq)]
377377
pub struct BenchSamples {
378-
priv ns_iter_summ: stats::Summary,
379-
priv mb_s: uint
378+
ns_iter_summ: stats::Summary,
379+
mb_s: uint,
380380
}
381381

382382
#[deriving(Clone, Eq)]

src/libtest/stats.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,18 @@ pub trait Stats {
130130
#[deriving(Clone, Eq)]
131131
#[allow(missing_doc)]
132132
pub struct Summary {
133-
sum: f64,
134-
min: f64,
135-
max: f64,
136-
mean: f64,
137-
median: f64,
138-
var: f64,
139-
std_dev: f64,
140-
std_dev_pct: f64,
141-
median_abs_dev: f64,
142-
median_abs_dev_pct: f64,
143-
quartiles: (f64,f64,f64),
144-
iqr: f64,
133+
pub sum: f64,
134+
pub min: f64,
135+
pub max: f64,
136+
pub mean: f64,
137+
pub median: f64,
138+
pub var: f64,
139+
pub std_dev: f64,
140+
pub std_dev_pct: f64,
141+
pub median_abs_dev: f64,
142+
pub median_abs_dev_pct: f64,
143+
pub quartiles: (f64,f64,f64),
144+
pub iqr: f64,
145145
}
146146

147147
impl Summary {

0 commit comments

Comments
 (0)