udftest: User Defined Function (UDF) unit test object

Description Usage Arguments Methods

Description

udftest objects store details about unit tests for user-defined functions. Each udftest object has the following properties:

query

Query using the UDF. The UDF's name should be represented by '?' so that name changes are automatically handled. For example, "SELECT ?(21)", would call the UDF with input value 21.

expect

Expected value returned by the query

description

Detailed description of the test

example

Whether or not to include this test in any generated documentation

is_udftest() checks if an object is a udftest object

Usage

1

Arguments

x

An object

Methods

Public methods


Method new()

Initialize a new udftest object

Usage
udftest$new(query, expect, description, example = TRUE)
Arguments
query

Query using the UDF

expect

Expected value returned by the query

description

Detailed description of the test

example

Whether or not to include this test in any generated documentation (default: TRUE)


Method clone()

The objects of this class are cloneable with this method.

Usage
udftest$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


briandconnelly/udftool documentation built on Dec. 19, 2021, 11:43 a.m.