@@ -419,8 +419,7 @@ TEST(EncryptionSequencer, ResultStorage) {
419419
420420// Test BOOLEAN type uses per-block encryption (not per-value)
421421TEST (EncryptionSequencer, BooleanTypeUsesPerBlockEncryption) {
422- // BOOLEAN is permanently unsupported for per-value operations
423- // and always defaults to per-block encryption
422+ // BOOLEAN is not supported for per-value encryption and always defaults to per-block encryption
424423 std::vector<uint8_t > boolean_data = {0xB4 , 0xFF , 0x00 }; // some boolean bit-packed data
425424
426425 DataBatchEncryptionSequencer sequencer (
@@ -440,8 +439,8 @@ TEST(EncryptionSequencer, BooleanTypeUsesPerBlockEncryption) {
440439 bool result = sequencer.ConvertAndEncrypt (boolean_data);
441440 ASSERT_TRUE (result) << " BOOLEAN encryption failed: " << sequencer.error_stage_ << " - " << sequencer.error_message_ ;
442441
443- // Verify it used per-block encryption mode
444- ASSERT_TRUE (sequencer.encryption_metadata_ .count (" encrypt_mode_dict_page" ) > 0 );
442+ // Verify per-block encryption mode as used.
443+ ASSERT_TRUE (sequencer.encryption_metadata_ .count (" encrypt_mode_dict_page" ) == 1 );
445444 EXPECT_EQ (sequencer.encryption_metadata_ .at (" encrypt_mode_dict_page" ), " per_block" );
446445
447446 // Verify round-trip works
@@ -452,8 +451,7 @@ TEST(EncryptionSequencer, BooleanTypeUsesPerBlockEncryption) {
452451
453452// Test RLE_DICTIONARY format uses per-block encryption (not per-value)
454453TEST (EncryptionSequencer, RleDictionaryFormatUsesPerBlockEncryption) {
455- // RLE_DICTIONARY is permanently unsupported for per-value operations
456- // since the values are not present in the data, only references to them
454+ // RLE_DICTIONARY is not supported for per-value encryption since the values are not present in the data, only references to them
457455 std::vector<uint8_t > rle_dict_data = {0x02 , 0x00 , 0x00 , 0x00 , 0x01 }; // some RLE dictionary encoded data
458456
459457 DataBatchEncryptionSequencer sequencer (
@@ -474,7 +472,7 @@ TEST(EncryptionSequencer, RleDictionaryFormatUsesPerBlockEncryption) {
474472 ASSERT_TRUE (result) << " RLE_DICTIONARY encryption failed: " << sequencer.error_stage_ << " - " << sequencer.error_message_ ;
475473
476474 // Verify it used per-block encryption mode
477- ASSERT_TRUE (sequencer.encryption_metadata_ .count (" encrypt_mode_dict_page" ) > 0 );
475+ ASSERT_TRUE (sequencer.encryption_metadata_ .count (" encrypt_mode_dict_page" ) == 1 );
478476 EXPECT_EQ (sequencer.encryption_metadata_ .at (" encrypt_mode_dict_page" ), " per_block" );
479477
480478 // Verify round-trip works
0 commit comments