Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
TestParseText.cpp File Reference

Unit Test for ParseText() More...

#include <iostream>
#include <cstring>
#include <cmath>
+ Include dependency graph for TestParseText.cpp:

Go to the source code of this file.

Classes

class  CIccXmlArrayType< T, Tsig >
 

Typedefs

typedef unsigned int icUInt32Number
 

Enumerations

enum  icTagTypeSignature { icSigUInt16ArrayType = 1969828150 }
 

Functions

bool icIsNumChar (char c)
 
int main ()
 
float nanf (const char *tagp)
 

Detailed Description

Unit Test for ParseText()

Author
@h02332 | David Hoyt | @xsscx
Date
24 MAY 2024
Version
1.0.2

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Compile: clang++ -std=c++17 -fsanitize=address -isysroot $(xcrun –show-sdk-path) -I$(xcrun –show-sdk-path)/usr/include/c++/v1 TestParseText.cpp -o TestParseText

Definition in file TestParseText.cpp.

Typedef Documentation

◆ icUInt32Number

typedef unsigned int icUInt32Number

Definition at line 32 of file TestParseText.cpp.

Enumeration Type Documentation

◆ icTagTypeSignature

Enumerator
icSigUInt16ArrayType 

Definition at line 33 of file TestParseText.cpp.

33{ icSigUInt16ArrayType = 1969828150 };
@ icSigUInt16ArrayType

Function Documentation

◆ icIsNumChar()

bool icIsNumChar ( char c)

Definition at line 35 of file TestParseText.cpp.

35 {
36 return (c >= '0' && c <= '9') || c == '.' || c == '-' || c == '+';
37}

Referenced by CIccXmlArrayType< T, Tsig >::ParseText().

+ Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 89 of file TestParseText.cpp.

89 {
90 const char testInput[] = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
91 unsigned short buffer[100];
93
94 arrayType.ParseText(buffer, 100, testInput);
95
96 std::cout << "Test completed successfully.\n";
97 return 0;
98}
icUInt32Number ParseText(T *pBuf, icUInt32Number nSize, const char *szText)

References CIccXmlArrayType< T, Tsig >::ParseText().

+ Here is the call graph for this function:

◆ nanf()

float nanf ( const char * tagp)

Definition at line 39 of file TestParseText.cpp.

39 {
40 return std::nan("");
41}