diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2024-10-27 01:53:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-27 01:53:18 -0300 |
| commit | fcb5613755b08fcb7ae73a3826b1cdce40e2747f (patch) | |
| tree | e9f1df3a4e0d9b2bb38fdc432edeae21424dbe99 /test/test_relational_engine.ml | |
| parent | 2eab114a120c7818861c0640ecdc300cf7366e53 (diff) | |
| download | Sakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.tar.gz Sakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.zip | |
State of the world with Merkle Tree composition of files (#2)
* file state hash calculation with history on replace and insert
* add state transitions with linear hashing
* add test
* format dune files
* nix format
* delete shared flake
* disable fmt check on flake
* add nix formatter to flake shell
Diffstat (limited to '')
| -rw-r--r-- | test/test_relational_engine.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_relational_engine.ml b/test/test_relational_engine.ml index e69de29..69a7df2 100644 --- a/test/test_relational_engine.ml +++ b/test/test_relational_engine.ml @@ -0,0 +1,8 @@ + +let%test _ = + let open Relational_engine.Disk.Executor in + let stream: history = [{state = _EMPTY_SHA_HASH_; files = StringMap.empty}] in + let locations: locations = StringMap.empty in + let (new_commit, _) = Result.get_ok @@ write (List.hd stream) locations ~filename:"trash" @@ Bytes.of_string "abc" in + let expected_state_hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837830" in + new_commit.state = expected_state_hash |
