Vendor dependencies

Let's see how I like this workflow.
This commit is contained in:
John Doty 2022-12-19 08:27:18 -08:00
parent 34d1830413
commit 9c435dc440
7500 changed files with 1665121 additions and 99 deletions

30
vendor/cassowary/tests/removal.rs vendored Normal file
View file

@ -0,0 +1,30 @@
extern crate cassowary;
use cassowary::{Variable, Solver, Constraint};
use cassowary::WeightedRelation::*;
use cassowary::strength::*;
mod common;
use common::new_values;
#[test]
fn remove_constraint() {
let (value_of, update_values) = new_values();
let mut solver = Solver::new();
let val = Variable::new();
let constraint: Constraint = val | EQ(REQUIRED) | 100.0;
solver.add_constraint(constraint.clone()).unwrap();
update_values(solver.fetch_changes());
assert_eq!(value_of(val), 100.0);
solver.remove_constraint(&constraint).unwrap();
solver.add_constraint(val | EQ(REQUIRED) | 0.0).unwrap();
update_values(solver.fetch_changes());
assert_eq!(value_of(val), 0.0);
}