Verse Library verse

07 Testing And Profiling Your Algorithms

Executes merge sort on comparable arrays and reports pass fail status via the project logger.

extracted-snippets/documentation/en-us/uefn/sorting-algorithms-in-verse/07-testing-and-profiling-your-algorithms.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/sorting-algorithms-in-verse
# Local doc:  epic-docs/documentation/en-us/uefn/sorting-algorithms-in-verse.md
# Section:    Testing and Profiling Your Algorithms
# Test function for sorting arrays and profiling the code.
RunArrayTest(ActualArray:[]t, Compare(L:t, R:t)<decides><transacts>:t where t:subtype(comparable))<decides><transacts>:void=
# Perform merge sort
ResultArray := SortingAlgorithms.MergeSort(ActualArray, Compare)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in