test-hashtables-doubly-weak.scm 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ;;; Copyright (C) 2025 Igalia, S.L.
  2. ;;; Copyright (C) 2024 David Thompson <dave@spritely.institute>
  3. ;;; Copyright (C) 2023, 2024 Robin Templeton
  4. ;;;
  5. ;;; Licensed under the Apache License, Version 2.0 (the "License");
  6. ;;; you may not use this file except in compliance with the License.
  7. ;;; You may obtain a copy of the License at
  8. ;;;
  9. ;;; http://www.apache.org/licenses/LICENSE-2.0
  10. ;;;
  11. ;;; Unless required by applicable law or agreed to in writing, software
  12. ;;; distributed under the License is distributed on an "AS IS" BASIS,
  13. ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ;;; See the License for the specific language governing permissions and
  15. ;;; limitations under the License.
  16. ;;; Commentary:
  17. ;;;
  18. ;;; Hashtable tests.
  19. ;;;
  20. ;;; Code:
  21. (use-modules (srfi srfi-64)
  22. (test utils)
  23. (test hashtable-utils))
  24. (test-begin "test-hashtables-doubly-weak")
  25. (with-additional-imports ((hoot hashtables))
  26. ;; FIXME: These would need to be run in an async context in order
  27. ;; for any finalization to happen in the Hoot VM, but at least we
  28. ;; ensure that the main interface is working.
  29. (test-hashtable-impl make-doubly-weak-hashtable
  30. make-eq-doubly-weak-hashtable
  31. make-eqv-doubly-weak-hashtable
  32. doubly-weak-hashtable?
  33. doubly-weak-hashtable-hash
  34. doubly-weak-hashtable-equiv
  35. doubly-weak-hashtable-size
  36. doubly-weak-hashtable-ref
  37. doubly-weak-hashtable-set!
  38. doubly-weak-hashtable-delete!
  39. doubly-weak-hashtable-clear!
  40. doubly-weak-hashtable-contains?
  41. doubly-weak-hashtable-copy
  42. doubly-weak-hashtable-keys
  43. doubly-weak-hashtable-values
  44. doubly-weak-hashtable-for-each
  45. doubly-weak-hashtable-fold))
  46. (test-end* "test-hashtables-doubly-weak")