emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/triples ac10a3cc04 14/16: Test the ability to store vec


From: ELPA Syncer
Subject: [elpa] externals/triples ac10a3cc04 14/16: Test the ability to store vectors
Date: Tue, 21 Feb 2023 20:58:53 -0500 (EST)

branch: externals/triples
commit ac10a3cc04e9eef12e0830e8001ccfaa75e6620e
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>

    Test the ability to store vectors
---
 triples-test.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/triples-test.el b/triples-test.el
index c181b9a845..1f1fbbe541 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -296,6 +296,16 @@ easily debug into it.")
    (should (equal '(:name ("Name"))
                   (triples-get-type db "foo" 'named)))))
 
+(ert-deftest triples-vector ()
+  (triples-test-with-temp-db
+   (triples-add-schema db 'named 'name)
+   (triples-add-schema db 'embedding '(embedding :base/unique t :base/type 
vector))
+   (triples-set-type db "foo" 'named :name '("Name"))
+   (triples-set-type db "foo" 'embedding :embedding [1 2 3 4 5])
+   (should (equal '(:embedding [1 2 3 4 5])
+                  (triples-get-type db "foo" 'embedding)))
+   (should-error (triples-set-type db "foo" 'embedding :embedding '(1 2 3)))))
+
 (ert-deftest triples-reversed ()
   (triples-test-with-temp-db
    (triples-add-schema db 'named



reply via email to

[Prev in Thread] Current Thread [Next in Thread]