Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
utest-lexers-kcmdline.h File Reference

(/usr/bin/git 2024-02-13, commit: 5a1c351)

Header declaring the unit tests for crinitKernelCmdlineLex(). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void crinitKernelCmdlineLexTestSuccess (void **state)
 
void crinitKernelCmdlineLexTestNullInput (void **state)
 
void crinitKernelCmdlineLexTestLexerError (void **state)
 

Detailed Description

Header declaring the unit tests for crinitKernelCmdlineLex().

Function Documentation

◆ crinitKernelCmdlineLexTestLexerError()

void crinitKernelCmdlineLexTestLexerError ( void **  state)

Tests cases leading to a lexer error (CRINIT_TK_ERR).

For crinitKernelCmdlineLex() that can only happen if the input string starts with a character not allowed in an variable name and is not an opening double quote.

◆ crinitKernelCmdlineLexTestNullInput()

void crinitKernelCmdlineLexTestNullInput ( void **  state)

Tests detection of NULL pointer inputs.

crinitKernelCmdlineLex() shall fail if any pointer input parameter is NULL and/or the string in *s is NULL.

◆ crinitKernelCmdlineLexTestSuccess()

void crinitKernelCmdlineLexTestSuccess ( void **  state)

Tests successful lex-ing of valid inputs.

All possible return values of crinitKernelCmdlineLex() save for CRINIT_TK_ERR are triggered using accordingly built input strings.