-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
@@ -296,6 +296,7 @@ mod test { | |||
assert!(check_vault_name("vault_with_underscores")); | |||
assert!(check_vault_name("vault-with-dashes")); | |||
assert!(check_vault_name("vault-with-digits-123")); | |||
assert!(check_vault_name("vault中文名字")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea to check that unicode works fully :)
jdb.remove(&h); | ||
jdb.remove(&h); | ||
// commit_batch would call journal_under(), | ||
// and we don't allow multiple owned removals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semantics of journaldb are a little weird as it never deletes the key from the backing store, so it actually wouldn't panic if the two removals were done on opposite sides of a journal_under
operation...but as this test it will panic if you remove twice in a single batch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I deliberately remove twice in a single batch and so mark this test as should_panic
. This basically tests the assert logic, if you think it's un-necessary, I can revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't hurt to have the test case -- it will let us know if that behavior changes.
Add test cases, spaces to tab etc.