• Michael Anthony Knyszek's avatar
    runtime: add tests for runtime mTreap · d13a9312
    Michael Anthony Knyszek authored
    This change exports the runtime mTreap in export_test.go and then adds a
    series of tests which check that the invariants of the treap are
    maintained under different operations. These tests also include tests
    for the treap iterator type.
    
    Also, we note that the find() operation on the treap never actually was
    best-fit, so the tests just ensure that it returns an appropriately
    sized span.
    
    For #30333.
    
    Change-Id: If81f7c746dda6677ebca925cb0a940134701b894
    Reviewed-on: https://go-review.googlesource.com/c/go/+/164100
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarAustin Clements <austin@google.com>
    d13a9312
export_test.go 12.9 KB