tests/testthat/test_sampleID.R

context('UUID generator')

UUID <- sapply(1:1000, function(x) {sampleID()})

test_that('IDs have the right format', {
    expect_true(all(grepl('[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}', UUID)))
})

test_that('IDs are unique', {
    expect_equal(length(UUID), length(unique(UUID)))
})

Try the MSGFgui package in your browser

Any scripts or data that you put into this service are public.

MSGFgui documentation built on Nov. 8, 2020, 8:26 p.m.