Skip to content

Suite() ​

Returns an instance of the class Suite

idl
;+
; :Returns: suite
;-
result = Suite(luna, description, $
  _ref_extra = value, $
  , $
  )

Init method for the luna test quite object. Should only be called directly from luna object method to create a suite or from another Suite object so that properties are correctly inherited.

Examples ​

Create suites from a luna object with luna.suite (or from another suite with suite.suite) and add tests to them with suite.test:

idl
l = luna()

; top level suite from luna
suite = l.suite('my_routine')

; nested suite from another suite
childSuite = suite.suite('with invalid input')

; each test holds expectations
it = childSuite.test('throws an error')
(it.expects('my_routine')).toThrow, 'bad input'

Arguments ​

luna ​

requiredinputtype=Luna

Specify the parent object.

description ​

requiredinputtype=String

Specify the string description for the suite of tests.

Keywords ​

_ref_extra {#kw-_ref_extra} ​

optionalinputtype=any

Specify the keywords VERBOSE, DEBUG, or QUIET on init and the corresponding object properties will be set and carry through to child objects.

post_execute ​

optionalinputtype=String

Set this to the name of a procedure that will be called after any test in this suite is executed.

pre_execute ​

optionalinputtype=String

Set this to the name of a procedure that will be called before any test in this test suite in executed.

Licensed under MIT.