#[test]
fn pinned_definite() {
	let mut pinned = crate::Requirement::new(
		|&v| v,
		&None);

	assert_eq!(pinned.get_definite(), Some(None));

	pinned.add_definite_match(&Some(Some(true)));
	assert_eq!(pinned.get_definite(), Some(Some(true)));

	pinned.add_definite_match(&Some(Some(false)));
	assert_eq!(pinned.get_definite(), Some(Some(true)));
}

#[test]
fn possible() {
	let mut pinned = crate::Requirement::new(
		|&v| v,
		&None);

	assert_eq!(pinned.get_definite(), Some(None));

	pinned.add_possible_match(&Some(Some(true)));
	assert_eq!(pinned.get_definite(), None);
	assert!(pinned.is_possible(None));
	assert!(pinned.is_possible(Some(true)));
	assert!(!pinned.is_possible(Some(false)));

	pinned.add_definite_match(&Some(Some(false)));
	assert_eq!(pinned.get_definite(), None);
	assert!(!pinned.is_possible(None));
	assert!(pinned.is_possible(Some(true)));
	assert!(pinned.is_possible(Some(false)));
}
