mirror of
				https://github.com/XRPLF/rippled.git
				synced 2025-11-04 11:15:56 +00:00 
			
		
		
		
	Fix test coverage
This commit is contained in:
		@@ -25,6 +25,32 @@ namespace ripple {
 | 
			
		||||
 | 
			
		||||
struct TypedLedgerEntries_test : public beast::unit_test::suite
 | 
			
		||||
{
 | 
			
		||||
    void
 | 
			
		||||
    testAccessSTArrayProxy()
 | 
			
		||||
    {
 | 
			
		||||
        STArray innerArray;
 | 
			
		||||
        STArrayProxy<LedgerObjectType<ltSIGNER_LIST>> array{&innerArray};
 | 
			
		||||
 | 
			
		||||
        BEAST_EXPECT(array.empty());
 | 
			
		||||
        auto item = array.createItem();
 | 
			
		||||
        item.fsfOwnerNode() = 1;
 | 
			
		||||
        array.push_back(item);
 | 
			
		||||
 | 
			
		||||
        BEAST_EXPECT(array.back().fsfOwnerNode() == 1);
 | 
			
		||||
 | 
			
		||||
        BEAST_EXPECT(array.value().back()[sfOwnerNode] == 1);
 | 
			
		||||
 | 
			
		||||
        BEAST_EXPECT(array.begin()->fsfOwnerNode() == 1);
 | 
			
		||||
        BEAST_EXPECT(std::distance(array.begin(), array.end()) == 1);
 | 
			
		||||
        BEAST_EXPECT(array.size() == 1);
 | 
			
		||||
        BEAST_EXPECT(!array.empty());
 | 
			
		||||
        BEAST_EXPECT(array.at(0).fsfOwnerNode() == 1);
 | 
			
		||||
        BEAST_EXPECT(!array.at(1).isValid());
 | 
			
		||||
        BEAST_EXPECT(array.valid());
 | 
			
		||||
        BEAST_EXPECT(
 | 
			
		||||
            !STArrayProxy<LedgerObjectType<ltSIGNER_LIST>>{nullptr}.valid());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void
 | 
			
		||||
    testGet()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user