Skip to content

Commit

Permalink
Test for var equality
Browse files Browse the repository at this point in the history
  • Loading branch information
mmghannam committed Aug 22, 2023
1 parent c3b941a commit 9d2dfc1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ mod tests {
assert!(!var.borrow().inner().is_null());
}

#[test]
fn var_eq() {
let mut model = Model::new().include_default_plugins().create_prob("test");
let var1 = model.add_var(0.0, 1.0, 2.0, "x", VarType::Integer);
let var2 = model.add_var(0.0, 1.0, 2.0, "x", VarType::Integer);
assert_ne!(var1, var2);
}

#[test]
fn attach_data() {
let mut model = Model::new().include_default_plugins().create_prob("test");
Expand Down

0 comments on commit 9d2dfc1

Please sign in to comment.