diff options
author | bryan newbold <bnewbold@robocracy.org> | 2023-02-15 19:31:41 -0800 |
---|---|---|
committer | bryan newbold <bnewbold@robocracy.org> | 2023-02-15 19:31:43 -0800 |
commit | 1b2779ff09d0c2407d7ae0c62401d759231ea361 (patch) | |
tree | 6dbf3f44e48c8ef2b6fae6d600c9b75259dc3742 /adenosine-pds/tests | |
parent | 2eb5257a2f17a4581a842b1de2863e91e16aadf4 (diff) | |
download | adenosine-1b2779ff09d0c2407d7ae0c62401d759231ea361.tar.gz adenosine-1b2779ff09d0c2407d7ae0c62401d759231ea361.zip |
pds: mst: add empty layer nodes as needed
This is to match behavior of the upstream Javascript implementation.
Basically, if there is a "layer=2" node and a "layer=0" node, and no
other nodes, there should be a "layer=1" node in between with just the
'left' reference populated.
Diffstat (limited to 'adenosine-pds/tests')
-rw-r--r-- | adenosine-pds/tests/test_mst_interop.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/adenosine-pds/tests/test_mst_interop.rs b/adenosine-pds/tests/test_mst_interop.rs index af03fd7..8a5becc 100644 --- a/adenosine-pds/tests/test_mst_interop.rs +++ b/adenosine-pds/tests/test_mst_interop.rs @@ -3,7 +3,6 @@ use libipld::Cid; use std::collections::BTreeMap; use std::str::FromStr; -#[ignore] #[test] fn test_known_maps() { let mut repo = RepoStore::open_ephemeral().unwrap(); @@ -42,6 +41,7 @@ fn test_known_maps() { ); } +// TODO: behavior of these wide-char keys is undefined behavior in string MST #[ignore] #[test] fn test_tricky_map() { @@ -72,7 +72,6 @@ fn test_trims_top() { let l1root = "bafyreihuyj2vzb2vjw3yhxg6dy25achg5fmre6gg5m6fjtxn64bqju4dee"; let l0root = "bafyreibmijjc63mekkjzl3v2pegngwke5u6cu66g75z6uw27v64bc6ahqi"; - // NOTE: this test doesn't do much in this case of rust implementation let mut trim_map: BTreeMap<String, Cid> = Default::default(); trim_map.insert("com.example.record/40c73105b48f".to_string(), cid1.clone()); // level 0 @@ -123,7 +122,6 @@ fn test_insertion() { assert_eq!(insertion_after_cid.to_string(), l2root); } -#[ignore] #[test] fn test_higher_layers() { // "handles new layers that are two higher than existing" |