Skip to content

Commit 463e94d

Browse files
committed
Cleanup test naming in environment and namespace
1 parent 7be4f02 commit 463e94d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/environment.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl Environment {
303303

304304
#[cfg(test)]
305305
mod tests {
306-
mod environment_val_tests {
306+
mod environment_val {
307307
use crate::environment::EnvironmentVal;
308308
use crate::symbol::Symbol;
309309
use crate::value::{Value};
@@ -316,7 +316,7 @@ mod tests {
316316
////////////////////////////////////////////////////////////////////////////////
317317

318318
#[test]
319-
fn test_get_current_namespace() {
319+
fn get_current_namespace() {
320320
let env_val = EnvironmentVal::new_main_val();
321321

322322
assert_eq!(Symbol::intern("user"),env_val.get_current_namespace());
@@ -339,7 +339,7 @@ mod tests {
339339
//////////////////////////////////////////////////////////////////////////////
340340

341341
#[test]
342-
fn test_get_from_namespace() {
342+
fn get_from_namespace() {
343343
let env_val = EnvironmentVal::new_main_val();
344344

345345
env_val.insert_into_namespace(
@@ -377,7 +377,7 @@ mod tests {
377377
}
378378

379379
}
380-
mod environment_tests {
380+
mod environment {
381381
use crate::environment::Environment;
382382
use crate::environment::Environment::*;
383383
use crate::environment::EnvironmentVal;
@@ -392,7 +392,7 @@ mod tests {
392392
//
393393
////////////////////////////////////////////////////////////////////////
394394
#[test]
395-
fn test_get__plus() {
395+
fn get_plus() {
396396
let add_fn = rust_core::AddFn {};
397397

398398
let environment = Rc::new(Environment::new_main_environment());
@@ -406,15 +406,15 @@ mod tests {
406406
assert_eq!(8.to_value(),add_ifn.invoke(vec![3_i32.to_rc_value(),5_i32.to_rc_value()]));
407407
return;
408408
}
409-
panic!("test_get_plus: plus is: {:#?}",plus);
409+
panic!("get_plus: plus is: {:#?}",plus);
410410
}
411411
/////////////////////////////////////////////////////////////////////////
412412
//
413413
// pub fn insert(&self, sym: Symbol, val: Rc<Value>) {
414414
//
415415
/////////////////////////////////////////////////////////////////////////
416416
#[test]
417-
fn test_insert__plus() {
417+
fn insert_plus() {
418418
let add_fn = rust_core::AddFn {};
419419

420420
let environment = Rc::new(Environment::new_main_environment());

src/namespace.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl Namespaces {
106106
#[cfg(test)]
107107
mod tests {
108108

109-
mod namespaces_tests {
109+
mod namespaces {
110110
use crate::namespace::Namespaces;
111111
use crate::symbol::Symbol;
112112
use crate::value::Value;
@@ -118,7 +118,7 @@ mod tests {
118118
//
119119
////////////////////////////////////////////////////////////////////////////////////////////////////
120120
#[test]
121-
fn get_namespace_get_empty_and_fail() {
121+
fn get_get_empty_and_fail() {
122122
let namespaces = Namespaces::new();
123123
let clojure_core_plus = Symbol::intern("clojure.core/+");
124124
match &*namespaces.get(&Symbol::intern("clojure.your/+"), &clojure_core_plus) {
@@ -133,7 +133,7 @@ mod tests {
133133
}
134134

135135
#[test]
136-
fn get_namespace_qualified_symbol_overriding_namespace() {
136+
fn get_qualified_symbol_overriding_namespace() {
137137
let namespaces = Namespaces::new();
138138

139139
let clojure_core1_plus_1 = Symbol::intern("clojure.core1/+1");
@@ -156,7 +156,7 @@ mod tests {
156156
}
157157

158158
#[test]
159-
fn get_namespace_overwritten_namespace_again() {
159+
fn get_overwritten_namespace_again() {
160160
let namespaces = Namespaces::new();
161161

162162
let clojure_core_plus = Symbol::intern("clojure.core/+");
@@ -178,7 +178,7 @@ mod tests {
178178
}
179179

180180
#[test]
181-
fn get_namespace_namespace_symbol_and_symbol_separate() {
181+
fn get_namespace_symbol_and_symbol_separate() {
182182
let namespaces = Namespaces::new();
183183

184184
// add namespace core2/+2
@@ -204,7 +204,7 @@ mod tests {
204204
}
205205
}
206206
#[test]
207-
fn get_namespace_wrong_ns_right_name() {
207+
fn get_wrong_ns_right_name() {
208208
let namespaces = Namespaces::new();
209209
namespaces.insert_into_namespace(
210210
&Symbol::intern("core2"),

0 commit comments

Comments
 (0)