tglman / persy
Showing 1 of 1 files from the diff.

@@ -381,6 +381,32 @@
Loading
381 381
    });
382 382
}
383 383
384 +
#[test]
385 +
fn test_multiple_put_same_value_inverted_order_get_same_tx() {
386 +
    create_and_drop_index("multiple_put same_value_gut", |persy, index_name| {
387 +
        let mut tx = persy.begin().expect("begin transaction works");
388 +
        tx.put::<u8, u8>(index_name, 10, 12).expect("put works correctly");
389 +
        tx.put::<u8, u8>(index_name, 10, 11).expect("put works correctly");
390 +
        tx.put::<u8, u8>(index_name, 10, 13).expect("put works correctly");
391 +
        tx.put::<u8, u8>(index_name, 10, 12).expect("put works correctly");
392 +
        tx.put::<u8, u8>(index_name, 10, 13).expect("put works correctly");
393 +
394 +
        let mut res = tx.get::<u8, u8>(index_name, &10).expect("get works correctly");
395 +
        assert_eq!(res.next(), Some(11));
396 +
        assert_eq!(res.next(), Some(12));
397 +
        assert_eq!(res.next(), Some(13));
398 +
        assert_eq!(res.next(), None);
399 +
        let prep = tx.prepare().expect("prepare with index works");
400 +
        prep.commit().expect("commit with index works");
401 +
402 +
        let mut res = persy.get::<u8, u8>(index_name, &10).expect("get works correctly");
403 +
        assert_eq!(res.next(), Some(11));
404 +
        assert_eq!(res.next(), Some(12));
405 +
        assert_eq!(res.next(), Some(13));
406 +
        assert_eq!(res.next(), None);
407 +
    });
408 +
}
409 +
384 410
#[test]
385 411
fn test_index_browse() {
386 412
    create_and_drop_index("test_index_browse", |persy, index_name| {
Files Coverage
src 91.33%
tests 98.65%
Project Totals (37 files) 92.70%
Notifications are pending CI completion. Waiting for GitLab's status webhook to queue notifications. Push notifications now.
1
coverage:
2
  status:
3
    project:
4
      default:
5
        target: 80%
6
        threshold: 1.0%
7
    patch: off
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading