[types] Add some tests for equality of pairs

This commit is contained in:
Eryn Wells 2018-08-25 11:32:19 -07:00
parent 22f3c3a9e3
commit 9a728c9489
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,16 @@
/* types/tests/equality_value.rs
* Eryn Wells <eryn@erynwells.me>
*/
//! Tests of value-based equality for various types herein.
extern crate sibiltypes;
use sibiltypes::{Obj, Pair, Sym};
#[test]
fn pairs_with_one_similar_symbol_are_equal() {
let pa = Pair::with_car(Obj::new(Sym::with_str("ab")));
let pb = Pair::with_car(Obj::new(Sym::with_str("ab")));
assert_eq!(pa, pb);
}