From c6a569b8eeb86951a2936eb240f017a8afefcea2 Mon Sep 17 00:00:00 2001 From: Marcus Denker Date: Wed, 14 Feb 2024 13:21:07 +0100 Subject: [PATCH] - some recategorization - use the (now usused) #indexAt:ifAbsent: in SoilObjectSegment>>#indexAt: - add test for #nextAssociationAfter: on the index level now that #nextAfter: does not use it --- src/Soil-Core-Tests/SoilBackupTest.class.st | 2 +- src/Soil-Core-Tests/SoilDatabaseJournalTest.class.st | 2 +- src/Soil-Core-Tests/SoilIndexedDictionaryTest.class.st | 4 +++- src/Soil-Core-Tests/SoilObjectSegmentTest.class.st | 4 ---- src/Soil-Core/SoilFindRecordsVisitor.class.st | 2 +- src/Soil-Core/SoilObjectSegment.class.st | 9 +++++---- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Soil-Core-Tests/SoilBackupTest.class.st b/src/Soil-Core-Tests/SoilBackupTest.class.st index 0f60fc3c..bc48c50d 100644 --- a/src/Soil-Core-Tests/SoilBackupTest.class.st +++ b/src/Soil-Core-Tests/SoilBackupTest.class.st @@ -7,7 +7,7 @@ Class { #category : #'Soil-Core-Tests' } -{ #category : #'as yet unclassified' } +{ #category : #accessing } SoilBackupTest >> backupPath [ ^ 'soil-backup' ] diff --git a/src/Soil-Core-Tests/SoilDatabaseJournalTest.class.st b/src/Soil-Core-Tests/SoilDatabaseJournalTest.class.st index ca0312f8..6ab84b94 100644 --- a/src/Soil-Core-Tests/SoilDatabaseJournalTest.class.st +++ b/src/Soil-Core-Tests/SoilDatabaseJournalTest.class.st @@ -13,7 +13,7 @@ SoilDatabaseJournalTest class >> classUnderTest [ ^ SoilPersistentDatabaseJournal ] -{ #category : #'as yet unclassified' } +{ #category : #running } SoilDatabaseJournalTest >> fillDatabase [ | tx dict | tx := soil newTransaction. diff --git a/src/Soil-Core-Tests/SoilIndexedDictionaryTest.class.st b/src/Soil-Core-Tests/SoilIndexedDictionaryTest.class.st index aa878a56..f83e606f 100644 --- a/src/Soil-Core-Tests/SoilIndexedDictionaryTest.class.st +++ b/src/Soil-Core-Tests/SoilIndexedDictionaryTest.class.st @@ -447,7 +447,9 @@ SoilIndexedDictionaryTest >> testNextAfterWithTransaction [ "open a second transaction ..." tx2 := soil newTransaction. "and test last" - self assert: (tx2 root nextAfter: #one) value equals: #twovalue + self assert: (tx2 root nextAfter: #one) equals: #twovalue. + "test #nextAssociationAfter: on the iterator here, too" + self assert: (tx2 proxyForObjectId: (tx2 root newIterator nextAssociationAfter: #one) value) equals: #twovalue ] { #category : #tests } diff --git a/src/Soil-Core-Tests/SoilObjectSegmentTest.class.st b/src/Soil-Core-Tests/SoilObjectSegmentTest.class.st index 50a746e0..238a7043 100644 --- a/src/Soil-Core-Tests/SoilObjectSegmentTest.class.st +++ b/src/Soil-Core-Tests/SoilObjectSegmentTest.class.st @@ -1,10 +1,6 @@ Class { #name : #SoilObjectSegmentTest, #superclass : #TestCase, - #instVars : [ - 'reference', - 'label' - ], #category : #'Soil-Core-Tests' } diff --git a/src/Soil-Core/SoilFindRecordsVisitor.class.st b/src/Soil-Core/SoilFindRecordsVisitor.class.st index b6248e7a..79913802 100644 --- a/src/Soil-Core/SoilFindRecordsVisitor.class.st +++ b/src/Soil-Core/SoilFindRecordsVisitor.class.st @@ -36,7 +36,7 @@ SoilFindRecordsVisitor >> records [ ^ records ] -{ #category : #accessing } +{ #category : #api } SoilFindRecordsVisitor >> returnFirst [ numberOfRecords := 1 diff --git a/src/Soil-Core/SoilObjectSegment.class.st b/src/Soil-Core/SoilObjectSegment.class.st index 049e9856..e4c874b1 100644 --- a/src/Soil-Core/SoilObjectSegment.class.st +++ b/src/Soil-Core/SoilObjectSegment.class.st @@ -110,10 +110,11 @@ SoilObjectSegment >> id: anObject [ ] { #category : #accessing } -SoilObjectSegment >> indexAt: indexId [ - ^ self indexManager - at: indexId - ifAbsent: [ SoilIndexNotFound signal: 'index not found' ] +SoilObjectSegment >> indexAt: indexId [ + + ^ self + indexAt: indexId + ifAbsent: [ SoilIndexNotFound signal: 'index not found' ] ] { #category : #accessing }