Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Apr 15, 2024
1 parent 2d3c27c commit 255a418
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/modules/tas_studio/editor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4425,4 +4425,11 @@ mod tests {
prop_assert_eq!(old_script, new_script);
}
}

#[test]
fn open_db() {
let file = Path::new("test/db_test.hltasproj");

Editor::open(file).unwrap();
}
}
2 changes: 1 addition & 1 deletion src/modules/tas_studio/editor/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::modules::tas_studio::editor::utils::{

// This enum is stored in a SQLite DB as bincode bytes. All changes MUST BE BACKWARDS COMPATIBLE to
// be able to load old projects.
// Make sure that newer operations must be added at the end of the enum.
// Make sure that newer operations must be added at the end of the enum and update test/db_test.hltasproj.
/// A basic operation on a HLTAS.
///
/// All operations can be applied and undone. They therefore store enough information to be able to
Expand Down
Binary file added test/db_test.hltasproj
Binary file not shown.

0 comments on commit 255a418

Please sign in to comment.