Skip to content

Conversation

walmir-silva
Copy link
Contributor

  • Implemented the ArrayStack class in the KaririCode\DataStructure\Stack namespace.
  • Added comprehensive unit tests for the ArrayStack class in the KaririCode\DataStructure\Tests\Stack namespace.

Class:

  • KaririCode\DataStructure\Stack\ArrayStack

Tests:

  • KaririCode\DataStructure\Tests\Stack\ArrayStackTest

Implemented Features and Corresponding Tests:

  • Push method: testPushAddsElementToStack
  • Pop method: testPopRemovesElementFromStack
  • Pop from empty stack: testPopFromEmptyStackReturnsNull
  • Peek method: testPeekReturnsElementFromTopWithoutRemovingIt
  • Peek from empty stack: testPeekFromEmptyStackReturnsNull
  • Is empty method: testIsEmptyReturnsTrueIfStackIsEmpty
  • Size method: testSizeReturnsNumberOfElementsInStack
  • Clear method: testClearRemovesAllElementsFromStack
  • Get items method: testGetItemsReturnsAllElementsInStack
  • Various data types: testStackWithVariousDataTypes
  • Mixed operations: testStackBehaviorAfterMixedOperations
  • LIFO behavior: testStackFollowsLifoOrder

- Implemented the ArrayStack class in the KaririCode\DataStructure\Stack namespace.
- Added comprehensive unit tests for the ArrayStack class in the KaririCode\DataStructure\Tests\Stack namespace.

Class:
- KaririCode\DataStructure\Stack\ArrayStack

Tests:
- KaririCode\DataStructure\Tests\Stack\ArrayStackTest

Implemented Features and Corresponding Tests:
- Push method: testPushAddsElementToStack
- Pop method: testPopRemovesElementFromStack
- Pop from empty stack: testPopFromEmptyStackReturnsNull
- Peek method: testPeekReturnsElementFromTopWithoutRemovingIt
- Peek from empty stack: testPeekFromEmptyStackReturnsNull
- Is empty method: testIsEmptyReturnsTrueIfStackIsEmpty
- Size method: testSizeReturnsNumberOfElementsInStack
- Clear method: testClearRemovesAllElementsFromStack
- Get items method: testGetItemsReturnsAllElementsInStack
- Various data types: testStackWithVariousDataTypes
- Mixed operations: testStackBehaviorAfterMixedOperations
- LIFO behavior: testStackFollowsLifoOrder
@walmir-silva walmir-silva merged commit 0f45efa into main Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant