KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_richio.cpp File Reference

Test suite for RICHIO and related formatting utilities. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <richio.h>
#include <io/kicad/kicad_io_utils.h>
#include <wx/base64.h>
#include <wx/mstream.h>

Go to the source code of this file.

Macros

#define wxUSE_BASE64   1
 

Functions

 BOOST_AUTO_TEST_CASE (PrettifyLargeImageData)
 Verify that Prettify produces well-formed output for large (data ...) blocks such as base64-encoded images, and that STRING_LINE_READER can read the result.
 
 BOOST_AUTO_TEST_CASE (PrettifyLongQuotedString)
 Verify that STRING_LINE_READER can handle prettified output containing a very long quoted string (e.g.
 

Detailed Description

Test suite for RICHIO and related formatting utilities.

Definition in file test_richio.cpp.

Macro Definition Documentation

◆ wxUSE_BASE64

#define wxUSE_BASE64   1

Definition at line 34 of file test_richio.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( PrettifyLargeImageData )

Verify that Prettify produces well-formed output for large (data ...) blocks such as base64-encoded images, and that STRING_LINE_READER can read the result.

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23162

Definition at line 48 of file test_richio.cpp.

References BOOST_AUTO_TEST_CASE(), KICAD_FORMAT::FormatStreamData(), STRING_FORMATTER::GetString(), KICAD_FORMAT::Prettify(), OUTPUTFORMATTER::Print(), and STRING_LINE_READER::ReadLine().

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( PrettifyLongQuotedString )

Verify that STRING_LINE_READER can handle prettified output containing a very long quoted string (e.g.

a property value that exceeds the old 1 MB limit).

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23162

Definition at line 88 of file test_richio.cpp.

References STRING_FORMATTER::GetString(), KICAD_FORMAT::Prettify(), OUTPUTFORMATTER::Print(), OUTPUTFORMATTER::Quotes(), and STRING_LINE_READER::ReadLine().