# NOT RUN {
# Running the quick sort algorithm with sampling against a set of increasing input data sizes:
ds = 10^seq(1, 3, by = 0.5)
# Assigning a complexity class to test against:
cc = "loglinear"
# Note: short variable names are used to avoid exceeding the character limit in the line below.
expect_time_complexity(cc, sort(sample(1:100, data.sizes, replace = TRUE), method = "quick"), ds)
# The code above will throw an error if the function does not follow a log-linear trend.
# }
Run the code above in your browser using DataLab