Skip to content

Commit

Permalink
Rename quickcheck axiom tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-healy committed Sep 30, 2023
1 parent 8f85bdd commit 00790aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ impl<'a> InnerInterner<'a> {
}

#[cfg(test)]
mod test {
mod axioms {
use super::*;
use quickcheck::quickcheck;

quickcheck! {
fn intern_then_lookup(s: String) -> bool {
fn intern_then_lookup_returns_interned_string(s: String) -> bool {
let interner = Interner::new();
let id = interner.intern(&s);
let lookup_result = interner.lookup(id);
Expand All @@ -131,7 +131,7 @@ mod test {
}

quickcheck! {
fn interning_same_string_twice(s: String) -> bool {
fn interning_same_string_twice_returns_same_id(s: String) -> bool {
let interner = Interner::new();
let id1 = interner.intern(&s);
let id2 = interner.intern(&s);
Expand All @@ -154,7 +154,7 @@ mod test {
}

quickcheck! {
fn interning_different_strings(s: NonEqualStrings) -> bool {
fn interning_different_strings_returns_different_ids(s: NonEqualStrings) -> bool {
let interner = Interner::new();
let id1 = interner.intern(s.0);
let id2 = interner.intern(s.1);
Expand All @@ -163,7 +163,7 @@ mod test {
}

quickcheck! {
fn looking_up_twice_returns_same_ref(s: String) -> bool {
fn looking_up_same_id_twice_returns_same_ref(s: String) -> bool {
use std::ptr;

let interner = Interner::new();
Expand Down
2 changes: 1 addition & 1 deletion src/vm/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<T: PartialEq> PartialEq for Stack<T> {
}

#[cfg(test)]
mod stack_axioms {
mod axioms {
use quickcheck::{quickcheck, Arbitrary};

impl Arbitrary for Stack<usize> {
Expand Down

0 comments on commit 00790aa

Please sign in to comment.