wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
test_CsvWiz.cpp File Reference

Regression test: the CSV import and export wizards remember the field separator the user chose last time. More...

#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/config.h>
#include <wx/dcmemory.h>
#include <wx/fileconf.h>
#include <wx/frame.h>
#include <wx/log.h>
#include "Configuration.h"
#include "wizards/CsvWiz.h"
#include <catch2/catch.hpp>
Include dependency graph for test_CsvWiz.cpp:

Data Structures

class  TestApp
 

Functions

 wxDECLARE_APP (TestApp)
 
 SCENARIO ("The CSV wizards start with the separator that was saved")
 
int main (int argc, char **argv)
 

Detailed Description

Regression test: the CSV import and export wizards remember the field separator the user chose last time.

They called wxConfig::Read(key, choice) with a plain long, which is the overload that returns the value it read instead of storing it – so the result was thrown away and every wizard came up with "Semicolon", whatever had been saved. Coverity found it as dead code (CID 507037): the range checks after the read could never fire.