Skip to content

Span merge review #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 98 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion helix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ etcetera = "0.4"
textwrap = "0.15.1"

[dev-dependencies]
quickcheck = { version = "1", default-features = false }

proptest = {version = "1.0", default-features=false, features = ["std"]}
similar-asserts = "1.4.2"
11 changes: 11 additions & 0 deletions helix-core/proptest-regressions/syntax/test.txt

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions helix-core/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ pub fn compare_ropes(old: &Rope, new: &Rope) -> Transaction {
#[cfg(test)]
mod tests {
use super::*;
use proptest::{prop_assert_eq, proptest};

quickcheck::quickcheck! {
fn test_compare_ropes(a: String, b: String) -> bool {
proptest! {
fn test_compare_ropes(a: String, b: String) {
let mut old = Rope::from(a);
let new = Rope::from(b);
compare_ropes(&old, &new).apply(&mut old);
old == new
prop_assert_eq!(old, new)
}
}
}
Loading