Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for LFStackPush (0.13 sec)

  1. src/runtime/lfstack_test.go

    	// Check the stack is initially empty.
    	if LFStackPop(stack) != nil {
    		t.Fatalf("stack is not empty")
    	}
    
    	// Push one element.
    	node := allocMyNode(42)
    	LFStackPush(stack, fromMyNode(node))
    
    	// Push another.
    	node = allocMyNode(43)
    	LFStackPush(stack, fromMyNode(node))
    
    	// Pop one element.
    	node = toMyNode(LFStackPop(stack))
    	if node == nil {
    		t.Fatalf("stack is empty")
    	}
    	if node.data != 43 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 23:12:04 UTC 2022
    - 2.7K bytes
    - Viewed (0)
Back to top