AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Functions | Variables
gen_gtest_pred_impl Namespace Reference


def HeaderPreamble (n)
def Arity (n)
def Title (word)
def OneTo (n)
def Iter (n, format, sep='')
def ImplementationForArity (n)
def HeaderPostamble ()
def GenerateFile (path, content)
def GenerateHeader (n)
def UnitTestPreamble ()
def TestsForArity (n)
def UnitTestPostamble ()
def GenerateUnitTest (n)


 SCRIPT_DIR = os.path.dirname(sys.argv[0])
 HEADER = os.path.join(SCRIPT_DIR, '../include/gtest/gtest_pred_impl.h')
 UNIT_TEST = os.path.join(SCRIPT_DIR, '../test/')

Function Documentation

◆ Arity()

def gen_gtest_pred_impl.Arity (   n)
Returns the English name of the given arity.

◆ GenerateFile()

def gen_gtest_pred_impl.GenerateFile (   path,
Given a file path and a content string, overwrites it with the
given content.

◆ GenerateHeader()

def gen_gtest_pred_impl.GenerateHeader (   n)
Given the maximum arity n, updates the header file that implements
the predicate assertions.

◆ GenerateUnitTest()

def gen_gtest_pred_impl.GenerateUnitTest (   n)
Returns the tests for up-to n-ary predicate assertions.

◆ HeaderPostamble()

def gen_gtest_pred_impl.HeaderPostamble ( )
Returns the postamble for the header file.

◆ HeaderPreamble()

def gen_gtest_pred_impl.HeaderPreamble (   n)
Returns the preamble for the header file.

  n:  the maximum arity of the predicate macros to be generated.

◆ ImplementationForArity()

def gen_gtest_pred_impl.ImplementationForArity (   n)
Returns the implementation of n-ary predicate assertions.

◆ Iter()

def gen_gtest_pred_impl.Iter (   n,
  sep = '' 
Given a positive integer n, a format string that contains 0 or
more '%s' format specs, and optionally a separator string, returns
the join of n strings, each formatted with the format string on an
iterator ranged from 1 to n.


Iter(3, 'v%s', sep=', ') returns 'v1, v2, v3'.

◆ OneTo()

def gen_gtest_pred_impl.OneTo (   n)
Returns the list [1, 2, 3, ..., n].

◆ TestsForArity()

def gen_gtest_pred_impl.TestsForArity (   n)
Returns the tests for n-ary predicate assertions.

◆ Title()

def gen_gtest_pred_impl.Title (   word)
Returns the given word in title case.  The difference between
this and string's title() method is that Title('4-ary') is '4-ary'
while '4-ary'.title() is '4-Ary'.

◆ UnitTestPostamble()

def gen_gtest_pred_impl.UnitTestPostamble ( )
Returns the postamble for the tests.

◆ UnitTestPreamble()

def gen_gtest_pred_impl.UnitTestPreamble ( )
Returns the preamble for the unit test file.

Variable Documentation


gen_gtest_pred_impl.HEADER = os.path.join(SCRIPT_DIR, '../include/gtest/gtest_pred_impl.h')


gen_gtest_pred_impl.SCRIPT_DIR = os.path.dirname(sys.argv[0])


gen_gtest_pred_impl.UNIT_TEST = os.path.join(SCRIPT_DIR, '../test/')

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0