OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-storage commits / a52016b

Fix off-by-one issue in unit test
a52016bcbed9f1b9f6b708fb50deba7f59307aa5
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-09T00:02:29.000Z

Changed files (1) +6 -4

tests/persist/sexpr/file-episodic.scm +6 -4
……@@ -65,7 +65,8 @@
6565 (count-all (cog-value (ConceptNode "foo") (Predicate "repressed mem"))))
6666
6767; Verify contents
68(test-assert "base-count" (equal? 11 (count-all)))
68; 11 atoms + 1 for Predicate "*-IsKeyFlag-*"
69(test-assert "base-count" (equal? 12 (count-all)))
6970(test-assert "space1-count" (equal? 8
7071 (count-all (cog-value (ConceptNode "foo") (Predicate "real life")))))
7172(test-assert "space2-count" (equal? 6
……@@ -126,10 +127,10 @@
126127 (count-all (cog-value (ConceptNode "foo") (Predicate "real life")))
127128 (count-all (cog-value (ConceptNode "foo") (Predicate "repressed mem"))))
128129
129; 11 loaded plus three FileStorageNodes
130; 11 loaded + 1 for *-IsKeyFlag-* + three FileStorageNodes
130131; Plus four more: (Predicate "*-store-atomspace-*")
131132; and (Predicate "*-load-atomspace-*") and *-open-* and *-close-*
132(test-assert "base-count" (equal? 18 (count-all)))
133(test-assert "base-count" (equal? 19 (count-all)))
133134(test-assert "space1-count" (equal? 0
134135 (count-all (cog-value (ConceptNode "foo") (Predicate "real life")))))
135136(test-assert "space2-count" (equal? 0
……@@ -155,7 +156,8 @@
155156 (count-all (cog-value (ConceptNode "foo") (Predicate "real life")))
156157 (count-all (cog-value (ConceptNode "foo") (Predicate "repressed mem"))))
157158
158(test-assert "base-count" (equal? 18 (count-all)))
159; Same count as before: 19 (with *-IsKeyFlag-* marker)
160(test-assert "base-count" (equal? 19 (count-all)))
159161(test-assert "space1-count" (equal? 11
160162 (count-all (cog-value (ConceptNode "foo") (Predicate "real life")))))
161163(test-assert "space2-count" (equal? 9