github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/assets/how-to-guides/porting-solidity-to-gno/porting-12.gno (about)

     1  // AuctionEnd() Function Test
     2  func TestAuctionEnd(t *testing.T) {
     3  	// Auction is ongoing
     4  	shouldPanic(t, AuctionEnd)
     5  
     6  	// Auction ends
     7  	highestBid = 3
     8  	std.TestSkipHeights(500)
     9  	shouldNoPanic(t, AuctionEnd)
    10  	shouldEqual(t, ended, true)
    11  
    12  	banker := std.GetBanker(std.BankerTypeRealmSend)
    13  	shouldEqual(t, banker.GetCoins(receiver).String(), "3ugnot")
    14  
    15  	// Auction has already ended
    16  	shouldPanic(t, AuctionEnd)
    17  	shouldEqual(t, ended, true)
    18  }