diff --git a/doc/first-steps.md b/doc/first-steps.md index dcb0623f..0ebf79ea 100644 --- a/doc/first-steps.md +++ b/doc/first-steps.md @@ -510,7 +510,7 @@ clicked by a keyboard or mouse, it sends the string "clicked". A signal handler explicitly provided by Widget, in the form of a callback function or a callback method, can react to such a signal. -A callback function has no return value can have various arguments: +A callback function has no return value and can have various arguments: ```cpp void cb_function (FWidget* w, int* i, double* d, ...) @@ -527,29 +527,137 @@ void classname::cb_methode (FWidget* w, int* i, double* d, ...) We use the `addCallback()` method of the `FWidget` class to connect to other widget objects. -For calling functions and static methods: +(1) For calling functions or static methods via a pointer: ```cpp +template::type = nullptr + , typename... Args> void FWidget::addCallback ( const FString& cb_signal - , FCallback cb_handler - , FDataPtr data ) + , Function&& cb_function + , Args&&... args) {...} ``` -For calling a member method of a specific instance: +(2) For calling functions or static methods via a reference: ```cpp +template::type = nullptr + , typename... Args> void FWidget::addCallback ( const FString& cb_signal - , FWidget* cb_instance - , FMemberCallback cb_handler - , FDataPtr data ) + , Function& cb_function + , Args&&... args) {...} ``` -There are two macros `F_FUNCTION_CALLBACK` and `F_METHOD_CALLBACK` to avoid -having to deal with necessary type conversions. With `delCallback()` you can -remove a connection to a signal handler or a widget. Alternatively, you can -use `delAllCallbacks()` to remove all existing callbacks from an object. +(3) For calling a member method of a specific instance: + +```cpp +template::type = nullptr + , typename MemberFunctionPointer::type = nullptr + , typename... Args> +void FWidget::addCallback ( const FString& cb_signal + , Object&& cb_instance + , Function&& cb_member + , Args&&... args) +{...} +``` + +(4) For calling a std::bind call wrapper or a lambda expression: +```cpp +template::type = nullptr + , typename... Args> +void FWidget::addCallback ( const FString& cb_signal + , Function&& cb_function + , Args&&... args) +{...} +``` + +(5) For calling a std::bind call wrapper to a specific instance: + +```cpp +template::type = nullptr + , typename ClassObject::type = nullptr + , typename... Args> +void FWidget::addCallback ( const FString& cb_signal + , Object&& cb_instance + , Function&& cb_function + , Args&&... args) +{...} +``` + +(6) For calling a lambda function that has been stored in a variable +with the keyword auto: + +```cpp +template::type = nullptr + , typename... Args> +void FWidget::addCallback ( const FString& cb_signal + , Function& cb_function + , Args&&... args) +{...} +``` + +With `delCallback(...)` you can remove a connection to a signal handler +or a widget instance. Alternatively, you can use `delCallbacks()` to +remove all existing callbacks from an object. + +To delete functions or static methods callbacks via a pointer:(4) + +```cpp +template::type = nullptr> +void FWidget::delCallback (FunctionPtr&& cb_func_ptr) +{...} +``` + +To delete functions or static methods callbacks via a reference:(5) + +```cpp +template::type = nullptr> +void FWidget::delCallback (Function& cb_function) +{...} +``` + +To delete all callbacks from a specific instance:(1) + +```cpp +template::type = nullptr> +void FWidget::delCallback (Object&& cb_instance) +{...} +``` + +To delete all callbacks of a signal:(2) + +```cpp +void delCallback (const FString& cb_signal) +{...} +``` + +To delete all callbacks of a signal and specific instance:(3) + +```cpp +template::type = nullptr> +void delCallback (const FString& cb_signal, Object&& cb_instance) +{...} +``` + +To delete all callbacks from a widget:(6) + +```cpp +void delCallback() +{...} +``` ### The FINAL CUT widgets emit the following default signals ### diff --git a/examples/background-color.cpp b/examples/background-color.cpp index 3b0d16eb..0894b8ea 100644 --- a/examples/background-color.cpp +++ b/examples/background-color.cpp @@ -42,7 +42,7 @@ class Background final : public finalcut::FDialog using FDialog::setGeometry; // Typedef - typedef std::tuple RGB; + typedef std::tuple RGB; // Constructor explicit Background (finalcut::FWidget* = nullptr); diff --git a/examples/opti-move.cpp b/examples/opti-move.cpp index 70b1cb05..ddb33701 100644 --- a/examples/opti-move.cpp +++ b/examples/opti-move.cpp @@ -21,6 +21,7 @@ ***********************************************************************/ #include +#include #include #include diff --git a/examples/rotozoomer.cpp b/examples/rotozoomer.cpp index 99f3d462..a25a9f5b 100644 --- a/examples/rotozoomer.cpp +++ b/examples/rotozoomer.cpp @@ -28,7 +28,10 @@ #include namespace fc = finalcut::fc; -using namespace std::chrono; +using std::chrono::duration_cast; +using std::chrono::milliseconds; +using std::chrono::system_clock; +using std::chrono::time_point; using finalcut::FPoint; using finalcut::FSize; diff --git a/examples/termcap.cpp b/examples/termcap.cpp index 15c11200..24fcafed 100644 --- a/examples/termcap.cpp +++ b/examples/termcap.cpp @@ -32,7 +32,7 @@ namespace fc = finalcut::fc; void tcapBoolean (const std::string&, bool); void tcapNumeric (const std::string&, int); void tcapString (const std::string&, const char[]); -void debug (finalcut::FApplication&); +void debug (const finalcut::FApplication&); void booleans(); void numeric(); void string(); @@ -207,7 +207,7 @@ void tcapString (const std::string& name, const char cap_str[]) //---------------------------------------------------------------------- #if DEBUG -void debug (finalcut::FApplication& TermApp) +void debug (const finalcut::FApplication& TermApp) { const auto& fterm = TermApp.getFTerm(); auto& debug_data = fterm.getFTermDebugData(); diff --git a/examples/ui.cpp b/examples/ui.cpp index bd86c144..a6638197 100644 --- a/examples/ui.cpp +++ b/examples/ui.cpp @@ -103,7 +103,6 @@ ProgressDialog::ProgressDialog (finalcut::FWidget* parent) progressBar.setGeometry(FPoint{2, 3}, FSize{34, 1}, false); //progressBar.setPercentage(78); - using namespace std::placeholders; reset.addCallback ( "clicked", @@ -293,7 +292,7 @@ class MyDialog final : public finalcut::FDialog void onClose (finalcut::FCloseEvent*) override; // Callback methods - void cb_noFunctionMsg (finalcut::FButton&); + void cb_noFunctionMsg (const finalcut::FButton&); void cb_about(); void cb_terminfo(); void cb_drives(); @@ -311,7 +310,7 @@ class MyDialog final : public finalcut::FDialog void cb_activateButton ( const finalcut::FRadioButton& , finalcut::FButton& ) const; void cb_view (const finalcut::FMenuItem*); - void cb_setInput (finalcut::FListBox&, finalcut::FLineEdit&) const; + void cb_setInput (const finalcut::FListBox&, finalcut::FLineEdit&) const; // Data members bool initialized{false}; @@ -805,7 +804,7 @@ void MyDialog::onClose (finalcut::FCloseEvent* ev) } //---------------------------------------------------------------------- -void MyDialog::cb_noFunctionMsg (finalcut::FButton& button) +void MyDialog::cb_noFunctionMsg (const finalcut::FButton& button) { auto text = button.getText(); text = text.replace('&', ""); @@ -1033,7 +1032,7 @@ void MyDialog::cb_view (const finalcut::FMenuItem* item) } //---------------------------------------------------------------------- -void MyDialog::cb_setInput ( finalcut::FListBox& listbox +void MyDialog::cb_setInput ( const finalcut::FListBox& listbox , finalcut::FLineEdit& lineedit) const { lineedit = listbox.getItem(listbox.currentItem()).getText(); diff --git a/examples/windows.cpp b/examples/windows.cpp index 3c481407..48165d52 100644 --- a/examples/windows.cpp +++ b/examples/windows.cpp @@ -20,7 +20,9 @@ * . * ***********************************************************************/ +#include #include + #include namespace fc = finalcut::fc; diff --git a/src/fcallback.cpp b/src/fcallback.cpp index 2296f0af..adc1d367 100644 --- a/src/fcallback.cpp +++ b/src/fcallback.cpp @@ -38,5 +38,52 @@ FCallback::FCallback() FCallback::~FCallback() // destructor { } + +// public methods of FCallback +//---------------------------------------------------------------------- +void FCallback::delCallback (const FString& cb_signal) +{ + // Deletes entries with the given signal from the callback list + + if ( callback_objects.empty() ) + return; + + auto iter = callback_objects.begin(); + + while ( iter != callback_objects.end() ) + { + if ( iter->cb_signal == cb_signal ) + iter = callback_objects.erase(iter); + else + ++iter; + } +} + +//---------------------------------------------------------------------- +void FCallback::delCallback() +{ + // Delete all callbacks from this widget + + callback_objects.clear(); // function pointer +} + +//---------------------------------------------------------------------- +void FCallback::emitCallback (const FString& emit_signal) const +{ + // Initiate callback for the given signal + + if ( callback_objects.empty() ) + return; + + for (auto&& cback : callback_objects) + { + if ( cback.cb_signal == emit_signal ) + { + // Calling the stored function pointer + cback.cb_function(); + } + } +} + } // namespace finalcut diff --git a/src/fcombobox.cpp b/src/fcombobox.cpp index c021cfa0..3d16be66 100644 --- a/src/fcombobox.cpp +++ b/src/fcombobox.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/fapplication.h" #include "final/fcolorpair.h" #include "final/fcombobox.h" @@ -551,10 +553,10 @@ void FComboBox::draw() print() << FPoint{int(getWidth()) - nf, 1} << button_color; - if ( FTerm::isNewFont() ) - print() << NF_button_arrow_down; - else - print() << fc::BlackDownPointingTriangle; // ▼ + if ( FTerm::isNewFont() ) + print() << NF_button_arrow_down; + else + print() << fc::BlackDownPointingTriangle; // ▼ if ( getFlags().shadow ) drawShadow(this); diff --git a/src/fevent.cpp b/src/fevent.cpp index be31e71c..d9d1468f 100644 --- a/src/fevent.cpp +++ b/src/fevent.cpp @@ -235,7 +235,7 @@ void FFocusEvent::ignore() // class FAccelEvent //---------------------------------------------------------------------- -FAccelEvent::FAccelEvent (fc::events ev_type, void* focused) // constructor +FAccelEvent::FAccelEvent (fc::events ev_type, FWidget* focused) // constructor : FEvent{ev_type} , focus_widget{focused} { } @@ -245,7 +245,7 @@ FAccelEvent::~FAccelEvent() // destructor { } //---------------------------------------------------------------------- -void* FAccelEvent::focusedWidget() const +FWidget* FAccelEvent::focusedWidget() const { return focus_widget; } //---------------------------------------------------------------------- diff --git a/src/flistbox.cpp b/src/flistbox.cpp index c65b24c6..163f03ba 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -644,7 +644,7 @@ void FListBox::adjustSize() // private methods of FListBox //---------------------------------------------------------------------- -inline FString& FListBox::getString (listBoxItems::iterator iter) +inline FString FListBox::getString (listBoxItems::iterator iter) { return iter->getText(); } diff --git a/src/flistview.cpp b/src/flistview.cpp index fad6875d..4434ca6d 100644 --- a/src/flistview.cpp +++ b/src/flistview.cpp @@ -24,8 +24,10 @@ #include // need for strcasecmp #endif +#include #include #include +#include #include #include "final/emptyfstring.h" diff --git a/src/flog.cpp b/src/flog.cpp index a9fd54d5..9a244551 100644 --- a/src/flog.cpp +++ b/src/flog.cpp @@ -45,7 +45,7 @@ FLog::~FLog() // destructor //---------------------------------------------------------------------- FLog& FLog::operator << (LogLevel l) { - using namespace std::placeholders; + using std::placeholders::_1; sync(); switch ( l ) diff --git a/src/flogger.cpp b/src/flogger.cpp index 106fc849..daec3cea 100644 --- a/src/flogger.cpp +++ b/src/flogger.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/flogger.h" namespace finalcut diff --git a/src/fmenuitem.cpp b/src/fmenuitem.cpp index 9fcad009..0333b9ae 100644 --- a/src/fmenuitem.cpp +++ b/src/fmenuitem.cpp @@ -21,6 +21,7 @@ ***********************************************************************/ #include +#include #include "final/fapplication.h" #include "final/fdialog.h" diff --git a/src/fmouse.cpp b/src/fmouse.cpp index 55c44629..e3b85a65 100644 --- a/src/fmouse.cpp +++ b/src/fmouse.cpp @@ -20,12 +20,13 @@ * . * ***********************************************************************/ +#include +#include + #include #include #include #include -#include -#include #include "final/fconfig.h" #include "final/fkeyboard.h" @@ -843,7 +844,8 @@ void FMouseSGR::setMoveState (const FPoint& mouse_position, int btn) } //---------------------------------------------------------------------- -void FMouseSGR::setPressedButtonState (const int btn, const struct timeval* time) +void FMouseSGR::setPressedButtonState ( const int btn + , const struct timeval* time ) { // Gets the extended x11 mouse mode (SGR) status for pressed buttons diff --git a/src/fpoint.cpp b/src/fpoint.cpp index e41dab23..6c6f8efc 100644 --- a/src/fpoint.cpp +++ b/src/fpoint.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/fpoint.h" namespace finalcut diff --git a/src/fradiomenuitem.cpp b/src/fradiomenuitem.cpp index cfcc43f8..8b882c8b 100644 --- a/src/fradiomenuitem.cpp +++ b/src/fradiomenuitem.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/fc.h" #include "final/fradiomenuitem.h" #include "final/fmenu.h" diff --git a/src/frect.cpp b/src/frect.cpp index e396512c..d861f836 100644 --- a/src/frect.cpp +++ b/src/frect.cpp @@ -21,6 +21,7 @@ ***********************************************************************/ #include +#include #include "final/fpoint.h" #include "final/frect.h" diff --git a/src/fscrollbar.cpp b/src/fscrollbar.cpp index 361e44a7..e5895cad 100644 --- a/src/fscrollbar.cpp +++ b/src/fscrollbar.cpp @@ -514,7 +514,7 @@ inline void FScrollbar::drawVerticalBackgroundLine() print (fc::MediumShade); // ▒ else if ( FTerm::isNewFont() ) print (fc::NF_rev_border_line_right); //⎹ - else + else print (' '); } diff --git a/src/fsize.cpp b/src/fsize.cpp index 5d957452..74ee9f5d 100644 --- a/src/fsize.cpp +++ b/src/fsize.cpp @@ -21,6 +21,7 @@ ***********************************************************************/ #include +#include #include "final/fpoint.h" #include "final/fsize.h" diff --git a/src/fstringstream.cpp b/src/fstringstream.cpp index c71897fa..c019b5d1 100644 --- a/src/fstringstream.cpp +++ b/src/fstringstream.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/fstring.h" #include "final/fstringstream.h" diff --git a/src/fterm_functions.cpp b/src/fterm_functions.cpp index 1fa430ee..6f838725 100644 --- a/src/fterm_functions.cpp +++ b/src/fterm_functions.cpp @@ -25,7 +25,9 @@ #endif #include +#include #include +#include #include "final/fapplication.h" #include "final/fcharmap.h" diff --git a/src/ftermfreebsd.cpp b/src/ftermfreebsd.cpp index f9925f60..69edb8a9 100644 --- a/src/ftermfreebsd.cpp +++ b/src/ftermfreebsd.cpp @@ -35,6 +35,7 @@ { \ if ( ! FApplication::isQuit() ) \ warnNotInitialized(); \ + \ return ret_value; \ } #endif diff --git a/src/ftermopenbsd.cpp b/src/ftermopenbsd.cpp index a49c34ae..8d12b856 100644 --- a/src/ftermopenbsd.cpp +++ b/src/ftermopenbsd.cpp @@ -32,6 +32,7 @@ { \ if ( ! FApplication::isQuit() ) \ warnNotInitialized(); \ + \ return ret_value; \ } #endif diff --git a/src/ftermxterminal.cpp b/src/ftermxterminal.cpp index 9ed49bc3..9c19ee5d 100644 --- a/src/ftermxterminal.cpp +++ b/src/ftermxterminal.cpp @@ -41,6 +41,7 @@ { \ if ( ! FApplication::isQuit() ) \ warnNotInitialized(); \ + \ return ret_value; \ } diff --git a/src/ftooltip.cpp b/src/ftooltip.cpp index 354d1d7d..99648e20 100644 --- a/src/ftooltip.cpp +++ b/src/ftooltip.cpp @@ -159,8 +159,9 @@ void FToolTip::calculateDimensions() int x{}; int y{}; - const std::size_t h = ( hasBorder() ) ? text_num_lines + 2 : text_num_lines; - const std::size_t w = ( hasBorder() ) ? max_line_width + 4 : max_line_width + 2; + bool border = hasBorder(); + const std::size_t h = ( border ) ? text_num_lines + 2 : text_num_lines; + const std::size_t w = ( border ) ? max_line_width + 4 : max_line_width + 2; const auto& r = getRootWidget(); if ( r ) diff --git a/src/fvterm.cpp b/src/fvterm.cpp index 6d0d468e..3ddd709c 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -252,7 +252,7 @@ void FVTerm::putVTerm() } //---------------------------------------------------------------------- -void FVTerm::updateTerminal() +void FVTerm::updateTerminal() const { // Updates pending changes to the terminal @@ -655,7 +655,7 @@ void FVTerm::flush() while ( ! output_buffer->empty() ) { - const static FTerm::defaultPutChar& FTermPutchar = FTerm::putchar(); + static const FTerm::defaultPutChar& FTermPutchar = FTerm::putchar(); FTermPutchar (output_buffer->front()); output_buffer->pop(); } diff --git a/src/fwindow.cpp b/src/fwindow.cpp index 865ebf65..cc184311 100644 --- a/src/fwindow.cpp +++ b/src/fwindow.cpp @@ -882,7 +882,7 @@ void closeDropDown (FWidget* widget, const FPoint& mouse_position) auto openmenu = FWidget::getOpenMenu(); if ( ! openmenu ) - return; + return; if ( openmenu->isInstanceOf("FMenu") || openmenu->isInstanceOf("FDialogListMenu") ) diff --git a/src/include/final/fbutton.h b/src/include/final/fbutton.h index 79cf4ce0..36ba2ae1 100644 --- a/src/include/final/fbutton.h +++ b/src/include/final/fbutton.h @@ -78,7 +78,7 @@ class FButton : public FWidget // Accessors const FString getClassName() const override; - FString& getText(); + FString getText() const; // Mutators void setForegroundColor (FColor) override; @@ -178,7 +178,7 @@ inline const FString FButton::getClassName() const { return "FButton"; } //---------------------------------------------------------------------- -inline FString& FButton::getText() +inline FString FButton::getText() const { return text; } //---------------------------------------------------------------------- diff --git a/src/include/final/fcallback.h b/src/include/final/fcallback.h index 9ee47344..5836997a 100644 --- a/src/include/final/fcallback.h +++ b/src/include/final/fcallback.h @@ -35,6 +35,9 @@ #error "Only can be included directly." #endif +#include +#include + #include "final/fstring.h" #include "final/ftypes.h" @@ -64,7 +67,7 @@ struct FCallbackData { } FCallbackData (const FCallbackData&) = default; - FCallbackData (FCallbackData&&) noexcept = default; + FCallbackData (FCallbackData&&) = default; FCallbackData& operator = (const FCallbackData&) = default; FCallbackData& operator = (FCallbackData&&) noexcept = default; @@ -144,15 +147,8 @@ class FCallback FCallback& operator = (const FCallback&) = delete; // Accessors - const FString getClassName() const - { - return "FCallback"; - } - - std::size_t getCallbackCount() const - { - return callback_objects.size(); - } + const FString getClassName() const; + std::size_t getCallbackCount() const; // Methods template(cb_member) - , std::forward(cb_instance) - , std::forward(args)... ); - FCallbackData obj{ cb_signal, instance, nullptr, fn }; - callback_objects.push_back(obj); - } - + , Args&&... args); template::type = nullptr @@ -183,202 +168,46 @@ class FCallback void addCallback ( const FString& cb_signal , Object&& cb_instance , Function&& cb_function - , Args&&... args) - { - // Add a function object to an instance as callback - - auto fn = std::bind (std::forward(cb_function), std::forward(args)...); - FCallbackData obj{ cb_signal, cb_instance, nullptr, fn }; - callback_objects.push_back(obj); - } - + , Args&&... args); template::type = nullptr , typename... Args> void addCallback ( const FString& cb_signal , Function&& cb_function - , Args&&... args) - { - // Add a function object as callback - - auto fn = std::bind ( std::forward(cb_function) - , std::forward(args)... ); - FCallbackData obj{ cb_signal, nullptr, nullptr, fn }; - callback_objects.push_back(obj); - } - + , Args&&... args); + template::type = nullptr + , typename... Args> + void addCallback ( const FString& cb_signal + , Function& cb_function + , Args&&... args); template::type = nullptr , typename... Args> void addCallback ( const FString& cb_signal , Function& cb_function - , Args&&... args) - { - // Add a function as callback - - auto ptr = reinterpret_cast(&cb_function); - auto fn = std::bind (cb_function, std::forward(args)...); - FCallbackData obj{ cb_signal, nullptr, ptr, fn }; - callback_objects.push_back(obj); - } - + , Args&&... args); template::type = nullptr , typename... Args> void addCallback ( const FString& cb_signal , Function&& cb_function - , Args&&... args) - { - // Add a function pointer as callback - - auto ptr = reinterpret_cast(cb_function); - auto fn = std::bind ( std::forward(cb_function) - , std::forward(args)... ); - FCallbackData obj{ cb_signal, nullptr, ptr, fn }; - callback_objects.push_back(obj); - } - - template::type = nullptr - , typename... Args> - void addCallback ( const FString& cb_signal - , Function& cb_function - , Args&&... args) - { - // Add a non-union class type as callback - - auto fn = std::bind (cb_function, std::forward(args)...); - FCallbackData obj{ cb_signal, nullptr, nullptr, fn }; - callback_objects.push_back(obj); - } - + , Args&&... args); template::type = nullptr> - void delCallback (Object&& cb_instance) - { - // Deletes entries with the given instance from the callback list - - if ( callback_objects.empty() ) - return; - - auto iter = callback_objects.begin(); - - while ( iter != callback_objects.end() ) - { - if ( iter->cb_instance == cb_instance ) - iter = callback_objects.erase(iter); - else - ++iter; - } - } - - void delCallback (const FString& cb_signal) - { - // Deletes entries with the given signal from the callback list - - if ( callback_objects.empty() ) - return; - - auto iter = callback_objects.begin(); - - while ( iter != callback_objects.end() ) - { - if ( iter->cb_signal == cb_signal ) - iter = callback_objects.erase(iter); - else - ++iter; - } - } - + void delCallback (Object&& cb_instance); + void delCallback (const FString& cb_signal); template::type = nullptr> - void delCallback (const FString& cb_signal, Object&& cb_instance) - { - // Deletes entries with the given signal and instance - // from the callback list - - if ( callback_objects.empty() ) - return; - - auto iter = callback_objects.begin(); - - while ( iter != callback_objects.end() ) - { - if ( iter->cb_signal == cb_signal - && iter->cb_instance == cb_instance ) - iter = callback_objects.erase(iter); - else - ++iter; - } - } - + void delCallback (const FString& cb_signal, Object&& cb_instance); template::type = nullptr> - void delCallback (FunctionPtr&& cb_func_ptr) - { - // Deletes entries with the given function pointer - // from the callback list - - if ( callback_objects.empty() ) - return; - - auto ptr = reinterpret_cast(cb_func_ptr); - auto iter = callback_objects.begin(); - - while ( iter != callback_objects.end() ) - { - if ( iter->cb_function_ptr == ptr ) - iter = callback_objects.erase(iter); - else - ++iter; - } - } - + void delCallback (FunctionPtr&& cb_func_ptr); template::type = nullptr> - void delCallback (Function& cb_function) - { - // Deletes entries with the given function from the callback list - - if ( callback_objects.empty() ) - return; - - auto ptr = reinterpret_cast(&cb_function); - auto iter = callback_objects.begin(); - - while ( iter != callback_objects.end() ) - { - if ( iter->cb_function_ptr == ptr ) - iter = callback_objects.erase(iter); - else - ++iter; - } - } - - void delCallback() - { - // Delete all callbacks from this widget - - callback_objects.clear(); // function pointer - } - - - void emitCallback (const FString& emit_signal) const - { - // Initiate callback for the given signal - - if ( callback_objects.empty() ) - return; - - for (auto&& cback : callback_objects) - { - if ( cback.cb_signal == emit_signal ) - { - // Calling the stored function pointer - cback.cb_function(); - } - } - } + void delCallback (const Function& cb_function); + void delCallback(); + void emitCallback (const FString& emit_signal) const; private: // Typedefs @@ -388,6 +217,208 @@ class FCallback FCallbackObjects callback_objects{}; }; +// FCallback inline functions +//---------------------------------------------------------------------- +inline const FString FCallback::getClassName() const +{ return "FCallback"; } + +//---------------------------------------------------------------------- +inline std::size_t FCallback::getCallbackCount() const +{ return callback_objects.size(); } + +//---------------------------------------------------------------------- +template::type + , typename FCallback::MemberFunctionPointer::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Object&& cb_instance + , Function&& cb_member + , Args&&... args) +{ + // Add a member function pointer as callback + + Object instance = cb_instance; + auto fn = std::bind ( std::forward(cb_member) + , std::forward(cb_instance) + , std::forward(args)... ); + FCallbackData obj{ cb_signal, instance, nullptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type + , typename FCallback::ClassObject::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Object&& cb_instance + , Function&& cb_function + , Args&&... args) +{ + // Add a function object to an instance as callback + + auto fn = std::bind (std::forward(cb_function), std::forward(args)...); + FCallbackData obj{ cb_signal, cb_instance, nullptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Function&& cb_function + , Args&&... args) +{ + // Add a function object as callback + + auto fn = std::bind ( std::forward(cb_function) + , std::forward(args)... ); + FCallbackData obj{ cb_signal, nullptr, nullptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Function& cb_function + , Args&&... args) +{ + // Add a function object reference as callback + + auto fn = std::bind (cb_function, std::forward(args)...); + FCallbackData obj{ cb_signal, nullptr, nullptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Function& cb_function + , Args&&... args) +{ + // Add a function reference as callback + + auto ptr = reinterpret_cast(&cb_function); + auto fn = std::bind (cb_function, std::forward(args)...); + FCallbackData obj{ cb_signal, nullptr, ptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type + , typename... Args> +inline void FCallback::addCallback ( const FString& cb_signal + , Function&& cb_function + , Args&&... args) +{ + // Add a function pointer as callback + + auto ptr = reinterpret_cast(cb_function); + auto fn = std::bind ( std::forward(cb_function) + , std::forward(args)... ); + FCallbackData obj{ cb_signal, nullptr, ptr, fn }; + callback_objects.push_back(obj); +} + +//---------------------------------------------------------------------- +template::type> +inline void FCallback::delCallback (Object&& cb_instance) +{ + // Deletes entries with the given instance from the callback list + + if ( callback_objects.empty() ) + return; + + auto iter = callback_objects.begin(); + + while ( iter != callback_objects.end() ) + { + if ( iter->cb_instance == cb_instance ) + iter = callback_objects.erase(iter); + else + ++iter; + } +} + +//---------------------------------------------------------------------- +template::type> +inline void FCallback::delCallback (const FString& cb_signal, Object&& cb_instance) +{ + // Deletes entries with the given signal and instance + // from the callback list + + if ( callback_objects.empty() ) + return; + + auto iter = callback_objects.begin(); + + while ( iter != callback_objects.end() ) + { + if ( iter->cb_signal == cb_signal + && iter->cb_instance == cb_instance ) + iter = callback_objects.erase(iter); + else + ++iter; + } +} + +//---------------------------------------------------------------------- +template::type> +inline void FCallback::delCallback (FunctionPtr&& cb_func_ptr) +{ + // Deletes entries with the given function pointer + // from the callback list + + if ( callback_objects.empty() ) + return; + + auto ptr = reinterpret_cast(cb_func_ptr); + auto iter = callback_objects.begin(); + + while ( iter != callback_objects.end() ) + { + if ( iter->cb_function_ptr == ptr ) + iter = callback_objects.erase(iter); + else + ++iter; + } +} + +//---------------------------------------------------------------------- +template::type> +inline void FCallback::delCallback (const Function& cb_function) +{ + // Deletes entries with the given function reference + // from the callback list + + if ( callback_objects.empty() ) + return; + + auto ptr = reinterpret_cast(&cb_function); + auto iter = callback_objects.begin(); + + while ( iter != callback_objects.end() ) + { + if ( iter->cb_function_ptr == ptr ) + iter = callback_objects.erase(iter); + else + ++iter; + } +} + } // namespace finalcut #endif // FCALLBACK_H diff --git a/src/include/final/fdata.h b/src/include/final/fdata.h index c8c0b6da..02e974eb 100644 --- a/src/include/final/fdata.h +++ b/src/include/final/fdata.h @@ -27,6 +27,8 @@ #error "Only can be included directly." #endif +#include + template struct FData { diff --git a/src/include/final/fdialog.h b/src/include/final/fdialog.h index ea52556d..64e903d4 100644 --- a/src/include/final/fdialog.h +++ b/src/include/final/fdialog.h @@ -194,7 +194,8 @@ class FDialog : public FWindow void leaveZoomButton (const mouseStates&); void pressZoomButton (const mouseStates&); bool isMouseOverMenu (const FPoint&) const; - void passEventToSubMenu (const mouseStates&, const FMouseEvent*); + void passEventToSubMenu ( const mouseStates& + , const FMouseEvent* ); void moveSizeKey (FKeyEvent*); void raiseActivateDialog(); void lowerActivateDialog(); diff --git a/src/include/final/fevent.h b/src/include/final/fevent.h index 51298a62..b4c8873b 100644 --- a/src/include/final/fevent.h +++ b/src/include/final/fevent.h @@ -218,24 +218,25 @@ class FFocusEvent : public FEvent // focus event //---------------------------------------------------------------------- // class FAccelEvent //---------------------------------------------------------------------- +class FWidget; // class forward declaration class FAccelEvent : public FEvent // focus event { public: FAccelEvent() = default; - FAccelEvent (fc::events, void*); + FAccelEvent (fc::events, FWidget*); FAccelEvent (const FAccelEvent&) = delete; ~FAccelEvent(); FAccelEvent& operator = (const FAccelEvent&) = delete; - void* focusedWidget() const; + FWidget* focusedWidget() const; bool isAccepted() const; void accept(); void ignore(); private: bool accpt{false}; - void* focus_widget{}; + FWidget* focus_widget{}; }; diff --git a/src/include/final/flistbox.h b/src/include/final/flistbox.h index 128ab93b..e5100a8c 100644 --- a/src/include/final/flistbox.h +++ b/src/include/final/flistbox.h @@ -82,7 +82,7 @@ class FListBoxItem // Accessors virtual const FString getClassName() const; - virtual FString& getText(); + virtual FString getText() const; virtual FDataPtr getData() const; // Mutators @@ -110,7 +110,7 @@ inline const FString FListBoxItem::getClassName() const { return "FListBoxItem"; } //---------------------------------------------------------------------- -inline FString& FListBoxItem::getText() +inline FString FListBoxItem::getText() const { return text; } //---------------------------------------------------------------------- @@ -247,7 +247,7 @@ class FListBox : public FWidget }; // Accessors - static FString& getString (listBoxItems::iterator); + static FString getString (listBoxItems::iterator); // Inquiry bool isHorizontallyScrollable() const; diff --git a/src/include/final/flistview.h b/src/include/final/flistview.h index 952d3cd6..6bb84a90 100644 --- a/src/include/final/flistview.h +++ b/src/include/final/flistview.h @@ -49,6 +49,7 @@ #include #include +#include #include #include "final/fscrollbar.h" diff --git a/src/include/final/fmenu.h b/src/include/final/fmenu.h index c344f825..30727eca 100644 --- a/src/include/final/fmenu.h +++ b/src/include/final/fmenu.h @@ -54,6 +54,8 @@ #error "Only can be included directly." #endif +#include + #include "final/fwindow.h" #include "final/fmenulist.h" diff --git a/src/include/final/fpoint.h b/src/include/final/fpoint.h index 740af574..981d43cd 100644 --- a/src/include/final/fpoint.h +++ b/src/include/final/fpoint.h @@ -36,6 +36,7 @@ #endif #include +#include #include "final/fstring.h" diff --git a/src/include/final/frect.h b/src/include/final/frect.h index c6727031..2f0463de 100644 --- a/src/include/final/frect.h +++ b/src/include/final/frect.h @@ -40,6 +40,7 @@ #endif #include +#include #include "final/fstring.h" diff --git a/src/include/final/fscrollbar.h b/src/include/final/fscrollbar.h index b137e0a9..5433ff4d 100644 --- a/src/include/final/fscrollbar.h +++ b/src/include/final/fscrollbar.h @@ -188,7 +188,6 @@ void initScrollbar ( FScrollbarPtr& bar return; } - using namespace std::placeholders; bar->setMinimum(0); bar->setValue(0); bar->hide(); diff --git a/src/include/final/fsize.h b/src/include/final/fsize.h index c06ad351..6186a06e 100644 --- a/src/include/final/fsize.h +++ b/src/include/final/fsize.h @@ -37,6 +37,7 @@ #include #include +#include #include "final/fstring.h" #include "final/ftypes.h" diff --git a/src/include/final/fspinbox.h b/src/include/final/fspinbox.h index 08ffffd7..ba419621 100644 --- a/src/include/final/fspinbox.h +++ b/src/include/final/fspinbox.h @@ -47,6 +47,8 @@ #error "Only can be included directly." #endif +#include + #include "final/fwidget.h" namespace finalcut diff --git a/src/include/final/fterm.h b/src/include/final/fterm.h index 6bb74c48..c66b3352 100644 --- a/src/include/final/fterm.h +++ b/src/include/final/fterm.h @@ -166,7 +166,7 @@ class FTerm final typedef FColorPalette::FSetPalette FSetPalette; // Constructor - explicit FTerm(); + FTerm(); // Disable copy constructor FTerm (const FTerm&) = delete; diff --git a/src/include/final/ftermbuffer.h b/src/include/final/ftermbuffer.h index ffe26694..5d53d733 100644 --- a/src/include/final/ftermbuffer.h +++ b/src/include/final/ftermbuffer.h @@ -35,6 +35,7 @@ #error "Only can be included directly." #endif +#include #include #include #include diff --git a/src/include/final/ftermcap.h b/src/include/final/ftermcap.h index e4f2d33e..45d0bf81 100644 --- a/src/include/final/ftermcap.h +++ b/src/include/final/ftermcap.h @@ -56,6 +56,7 @@ #endif #include +#include #include // FTermcap string macro diff --git a/src/include/final/fvterm.h b/src/include/final/fvterm.h index a015125b..97b57e69 100644 --- a/src/include/final/fvterm.h +++ b/src/include/final/fvterm.h @@ -98,8 +98,8 @@ class FVTerm typedef void (FVTerm::*FPreprocessingHandler)(); typedef std::function FPreprocessingFunction; - struct FTermArea; // forward declaration - struct FVTermPreprocessing; // forward declaration + struct FTermArea; // forward declaration + struct FVTermPreprocessing; // forward declaration typedef std::vector FPreprocessing; @@ -118,7 +118,7 @@ class FVTerm }; // Constructor - explicit FVTerm(); + FVTerm(); // Disable copy constructor FVTerm (const FVTerm&) = delete; @@ -148,7 +148,7 @@ class FVTerm const FTermArea* getVWin() const; const FPoint getPrintCursor(); static const FChar getAttribute(); - FTerm& getFTerm(); + FTerm& getFTerm() const; // Mutators void setTermXY (int, int) const; @@ -253,7 +253,7 @@ class FVTerm void createVTerm (const FSize&); void resizeVTerm (const FSize&) const; void putVTerm(); - void updateTerminal(); + void updateTerminal() const; virtual void addPreprocessingHandler ( const FVTerm* , const FPreprocessingFunction& ); virtual void delPreprocessingHandler (const FVTerm*); @@ -629,7 +629,7 @@ inline const FChar FVTerm::getAttribute() { return next_attribute; } //---------------------------------------------------------------------- -inline FTerm& FVTerm::getFTerm() +inline FTerm& FVTerm::getFTerm() const { return *fterm; } //---------------------------------------------------------------------- diff --git a/src/include/final/fwidget.h b/src/include/final/fwidget.h index 31f81df5..b4f95974 100644 --- a/src/include/final/fwidget.h +++ b/src/include/final/fwidget.h @@ -95,6 +95,7 @@ #endif #include +#include #include #include diff --git a/src/sgr_optimizer.cpp b/src/sgr_optimizer.cpp index 43606a71..e2d846a6 100644 --- a/src/sgr_optimizer.cpp +++ b/src/sgr_optimizer.cpp @@ -21,6 +21,7 @@ ***********************************************************************/ #include +#include #include "final/fc.h" #include "final/sgr_optimizer.h" diff --git a/test/fcallback-test.cpp b/test/fcallback-test.cpp index 51d25371..6f21c34e 100644 --- a/test/fcallback-test.cpp +++ b/test/fcallback-test.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include #include #include @@ -121,12 +123,12 @@ class FCallbackTest : public CPPUNIT_NS::TestFixture protected: void classNameTest(); - void memberFunctionCallbackTest(); - void instanceWithFunctionCallbackTest(); - void functionObjectTest(); - void functionCallbackTest(); + void memberFunctionPointerCallbackTest(); + void instanceWithFunctionObjectCallbackTest(); + void functionObjectCallbackTest(); + void functionObjectReferenceCallbackTest(); + void functionReferenceCallbackTest(); void functionPointerCallbackTest(); - void nonUnionClassCallbackTest(); void ownWidgetTest(); private: @@ -135,12 +137,12 @@ class FCallbackTest : public CPPUNIT_NS::TestFixture // Add a methods to the test suite CPPUNIT_TEST (classNameTest); - CPPUNIT_TEST (memberFunctionCallbackTest); - CPPUNIT_TEST (instanceWithFunctionCallbackTest); - CPPUNIT_TEST (functionObjectTest); - CPPUNIT_TEST (functionCallbackTest); + CPPUNIT_TEST (memberFunctionPointerCallbackTest); + CPPUNIT_TEST (instanceWithFunctionObjectCallbackTest); + CPPUNIT_TEST (functionObjectCallbackTest); + CPPUNIT_TEST (functionObjectReferenceCallbackTest); + CPPUNIT_TEST (functionReferenceCallbackTest); CPPUNIT_TEST (functionPointerCallbackTest); - CPPUNIT_TEST (nonUnionClassCallbackTest); CPPUNIT_TEST (ownWidgetTest); // End of test suite definition @@ -162,7 +164,7 @@ void FCallbackTest::classNameTest() } //---------------------------------------------------------------------- -void FCallbackTest::memberFunctionCallbackTest() +void FCallbackTest::memberFunctionPointerCallbackTest() { finalcut::FCallback cb{}; cb_class c{5, &root_widget}; @@ -228,7 +230,7 @@ void FCallbackTest::memberFunctionCallbackTest() } //---------------------------------------------------------------------- -void FCallbackTest::instanceWithFunctionCallbackTest() +void FCallbackTest::instanceWithFunctionObjectCallbackTest() { finalcut::FCallback cb{}; cb_class c{15, &root_widget}; @@ -317,7 +319,7 @@ void FCallbackTest::instanceWithFunctionCallbackTest() } //---------------------------------------------------------------------- -void FCallbackTest::functionObjectTest() +void FCallbackTest::functionObjectCallbackTest() { finalcut::FCallback cb{}; int i1{2}; @@ -377,7 +379,47 @@ void FCallbackTest::functionObjectTest() } //---------------------------------------------------------------------- -void FCallbackTest::functionCallbackTest() +void FCallbackTest::functionObjectReferenceCallbackTest() +{ + finalcut::FCallback cb{}; + int i{4}; + auto lambda1 = [] (int* value) + { + *value = *value << 8; + }; + auto lambda2 = [] (int& value) + { + value = value >> 4; + }; + using NonUnionClass = decltype(lambda1); + + CPPUNIT_ASSERT ( 0 == std::is_member_function_pointer::value ); + CPPUNIT_ASSERT ( 0 == std::is_function::type>::value ); + CPPUNIT_ASSERT ( 0 == std::is_function::value ); + CPPUNIT_ASSERT ( 0 == std::is_pointer::value ); + CPPUNIT_ASSERT ( 1 == std::is_object::value ); + CPPUNIT_ASSERT ( 1 == std::is_class::value ); + + cb.addCallback ("toggled", lambda1, &i); + CPPUNIT_ASSERT ( cb.getCallbackCount() == 1 ); + CPPUNIT_ASSERT ( i == 4 ); + + cb.emitCallback ("toggled"); + CPPUNIT_ASSERT ( i == 1024 ); + + cb.addCallback ("row-selected", lambda2, std::ref(i)); + CPPUNIT_ASSERT ( cb.getCallbackCount() == 2 ); + CPPUNIT_ASSERT ( i == 1024 ); + + cb.emitCallback ("row-selected"); + CPPUNIT_ASSERT ( i == 64 ); + + cb.delCallback(); + CPPUNIT_ASSERT ( cb.getCallbackCount() == 0 ); +} + +//---------------------------------------------------------------------- +void FCallbackTest::functionReferenceCallbackTest() { finalcut::FCallback cb{}; int i1{22}; @@ -464,45 +506,6 @@ void FCallbackTest::functionPointerCallbackTest() } //---------------------------------------------------------------------- -void FCallbackTest::nonUnionClassCallbackTest() -{ - finalcut::FCallback cb{}; - int i{4}; - auto lambda1 = [] (int* value) - { - *value = *value << 8; - }; - auto lambda2 = [] (int& value) - { - value = value >> 4; - }; - using NonUnionClass = decltype(lambda1); - - CPPUNIT_ASSERT ( 0 == std::is_member_function_pointer::value ); - CPPUNIT_ASSERT ( 0 == std::is_function::type>::value ); - CPPUNIT_ASSERT ( 0 == std::is_function::value ); - CPPUNIT_ASSERT ( 0 == std::is_pointer::value ); - CPPUNIT_ASSERT ( 1 == std::is_object::value ); - CPPUNIT_ASSERT ( 1 == std::is_class::value ); - - cb.addCallback ("toggled", lambda1, &i); - CPPUNIT_ASSERT ( cb.getCallbackCount() == 1 ); - CPPUNIT_ASSERT ( i == 4 ); - - cb.emitCallback ("toggled"); - CPPUNIT_ASSERT ( i == 1024 ); - - cb.addCallback ("row-selected", lambda2, std::ref(i)); - CPPUNIT_ASSERT ( cb.getCallbackCount() == 2 ); - CPPUNIT_ASSERT ( i == 1024 ); - - cb.emitCallback ("row-selected"); - CPPUNIT_ASSERT ( i == 64 ); - - cb.delCallback(); - CPPUNIT_ASSERT ( cb.getCallbackCount() == 0 ); -} - void FCallbackTest::ownWidgetTest() { Widget w; diff --git a/test/fkeyboard-test.cpp b/test/fkeyboard-test.cpp index 92a39b1c..660631b5 100644 --- a/test/fkeyboard-test.cpp +++ b/test/fkeyboard-test.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include #include #include @@ -28,7 +30,6 @@ #include #include -#include #include namespace test diff --git a/test/flogger-test.cpp b/test/flogger-test.cpp index 74bfc55d..21d91247 100644 --- a/test/flogger-test.cpp +++ b/test/flogger-test.cpp @@ -20,6 +20,10 @@ * . * ***********************************************************************/ +#include +#include +#include + #include #include #include @@ -28,8 +32,6 @@ #include #include -#include - #include //---------------------------------------------------------------------- diff --git a/test/foptiattr-test.cpp b/test/foptiattr-test.cpp index ad366311..a6eb3748 100644 --- a/test/foptiattr-test.cpp +++ b/test/foptiattr-test.cpp @@ -3,7 +3,7 @@ * * * This file is part of the FINAL CUT widget toolkit * * * -* Copyright 2018-2019 Markus Gans * +* Copyright 2018-2020 Markus Gans * * * * FINAL CUT is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * @@ -20,6 +20,9 @@ * . * ***********************************************************************/ +#include +#include + #include #include #include @@ -27,12 +30,9 @@ #include #include #include - #include #include -#include -#include #include @@ -134,9 +134,9 @@ void FOptiAttrTest::noArgumentTest() // Null test finalcut::FChar* ch_null = nullptr; CPPUNIT_ASSERT ( oa.changeAttribute(ch, ch) == 0 ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), "") ; - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), "") ; - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch_null), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), "" ); + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), "" ); + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch_null), "" ); delete ch; } @@ -205,7 +205,7 @@ void FOptiAttrTest::sgrOptimizerTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;2;1;3;34;47m") ; + , CSI "0;10;2;1;3;34;47m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -217,7 +217,7 @@ void FOptiAttrTest::sgrOptimizerTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;1;33;40m") ; + , CSI "0;10;1;33;40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -227,77 +227,77 @@ void FOptiAttrTest::sgrOptimizerTest() char buffer[8192] = { CSI "0;10m" CSI "11m" CSI "36m" CSI "44m" }; finalcut::SGRoptimizer sgr_optimizer(buffer); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;10;11;36;44m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;10;11;36;44m" ); std::strcpy(buffer, CSI "0;1m" CSI "34m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;1;34m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;1;34m" ); std::strcpy(buffer, CSI "m" CSI "34m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;34m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;34m" ); std::strcpy(buffer, CSI "1m" CSI "m" CSI "45m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "1;0;45m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "1;0;45m" ); std::strcpy(buffer, CSI "47m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "47m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "47m" ); std::strcpy(buffer, CSI "47m" CSI "m" CSI "1m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "47;0;1m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "47;0;1m" ); std::strcpy(buffer, CSI "49m" CSI "m" CSI "0m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "49;0;0m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "49;0;0m" ); std::strcpy(buffer, CSI "m" CSI "m" CSI "m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;0;0m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;0;0m" ); std::strcpy(buffer, CSI "m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "m" ); std::strcpy(buffer, CSI "0;10;1;7m" CSI "3m" CSI "39m" CSI "49m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;10;1;7;3;39;49m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;10;1;7;3;39;49m" ); std::strcpy(buffer, CSI "m" CSI "38;5;20m" CSI "48;5;229m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20;48;5;229m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20;48;5;229m" ); std::strcpy(buffer, CSI "m" CSI "38;5;20m" CSI "11;16H"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20m" CSI "11;16H") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20m" CSI "11;16H" ); std::strcpy(buffer, CSI "1;1H" CSI "m" CSI "38;5;35m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "1;1H" CSI "0;38;5;35m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "1;1H" CSI "0;38;5;35m" ); std::strcpy(buffer, CSI "m" CSI "38;5;20m" CSI "11;16H" CSI "48;5;229m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20m" CSI "11;16H" CSI "48;5;229m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20m" CSI "11;16H" CSI "48;5;229m" ); std::strcpy(buffer, CSI "m" CSI "38;5;20m" "ABC" CSI "48;5;229m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20mABC" CSI "48;5;229m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;5;20mABC" CSI "48;5;229m" ); std::strcpy(buffer, CSI "m" CSI "1m" CSI "2m" CSI "3m" CSI "4m" CSI "5m" CSI "7m" CSI "8m" CSI "9m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;1;2;3;4;5;7;8;9m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;1;2;3;4;5;7;8;9m" ); std::strcpy(buffer, CSI "0m" CSI "46;36;1m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;46;36;1m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;46;36;1m" ); std::strcpy(buffer, CSI "m" CSI "38;2;0;139;139m" CSI "48;2;240;255;240m"); sgr_optimizer.optimize(); - CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;2;0;139;139;48;2;240;255;240m") ; + CPPUNIT_ASSERT_CSTRING ( buffer, CSI "0;38;2;0;139;139;48;2;240;255;240m" ); delete to; delete from; @@ -379,7 +379,7 @@ void FOptiAttrTest::fakeReverseTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "37m" CSI "44m") ; + , CSI "37m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -387,7 +387,7 @@ void FOptiAttrTest::fakeReverseTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "34m" CSI "47m") ; + , CSI "34m" CSI "47m" ); CPPUNIT_ASSERT ( from->fg_color == finalcut::fc::LightGray ); CPPUNIT_ASSERT ( from->bg_color == finalcut::fc::Blue ); CPPUNIT_ASSERT ( *from == *to ); @@ -396,7 +396,7 @@ void FOptiAttrTest::fakeReverseTest() to->bg_color = finalcut::fc::Red; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "47m") ; + , CSI "31m" CSI "47m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -404,7 +404,7 @@ void FOptiAttrTest::fakeReverseTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "37m" CSI "41m") ; + , CSI "37m" CSI "41m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -478,7 +478,7 @@ void FOptiAttrTest::ansiTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;1m") ; + , CSI "0;10;1m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -489,7 +489,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;1m" CSI "34m" CSI "47m") ; + , CSI "0;10;1m" CSI "34m" CSI "47m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -500,7 +500,7 @@ void FOptiAttrTest::ansiTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "34m") ; + , CSI "0m" CSI "34m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -509,7 +509,7 @@ void FOptiAttrTest::ansiTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "40m") ; + , CSI "31m" CSI "40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -518,7 +518,7 @@ void FOptiAttrTest::ansiTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32m" CSI "44m") ; + , CSI "32m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -528,7 +528,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;1m") ; + , CSI "0;10;1m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -536,7 +536,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -544,7 +544,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m") ; + , CSI "0;10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -552,7 +552,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -560,7 +560,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m") ; + , CSI "0;10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -568,7 +568,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -576,7 +576,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;4m") ; + , CSI "0;10;4m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -584,7 +584,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -592,7 +592,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;5m") ; + , CSI "0;10;5m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -600,7 +600,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -608,7 +608,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7m") ; + , CSI "0;10;7m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -616,7 +616,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -624,7 +624,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7m") ; + , CSI "0;10;7m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -632,7 +632,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -640,7 +640,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;8m") ; + , CSI "0;10;8m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -648,7 +648,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -656,7 +656,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m") ; + , CSI "0;10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -664,7 +664,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -672,7 +672,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m") ; + , CSI "0;10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -680,7 +680,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -688,7 +688,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m") ; + , CSI "0;10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -696,7 +696,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -704,7 +704,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;11m") ; + , CSI "0;10;11m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -712,7 +712,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "10m" CSI "0m") ; + , CSI "10m" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -720,7 +720,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m" CSI "11m") ; + , CSI "0;10m" CSI "11m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -728,7 +728,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "10m") ; + , CSI "0m" CSI "10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -749,7 +749,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7;4;7;5;1;8;11m") ; + , CSI "0;10;7;4;7;5;1;8;11m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -758,7 +758,7 @@ void FOptiAttrTest::ansiTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "36m" CSI "44m") ; + , CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -766,7 +766,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7;5;8;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;7;5;8;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -774,7 +774,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7;5;8;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;7;5;8;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -796,7 +796,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;7;8;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;7;8;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -804,7 +804,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;8;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;8;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -817,7 +817,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -825,7 +825,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -833,7 +833,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -841,7 +841,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10;11m" CSI "36m" CSI "44m") ; + , CSI "0;10;11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -849,7 +849,7 @@ void FOptiAttrTest::ansiTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;10m" CSI "11m" CSI "36m" CSI "44m") ; + , CSI "0;10m" CSI "11m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -857,14 +857,14 @@ void FOptiAttrTest::ansiTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "10m" CSI "36m" CSI "44m") ; + , CSI "0m" CSI "10m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -872,7 +872,7 @@ void FOptiAttrTest::ansiTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 m ") ; + , "Esc [ 3 9 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -944,7 +944,7 @@ void FOptiAttrTest::vt100Test() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017$<2>") ; + , CSI "0;1m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -955,7 +955,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017$<2>") ; + , CSI "0;1m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -966,20 +966,20 @@ void FOptiAttrTest::vt100Test() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>" ) ; + , CSI "0m$<2>" ); // Red text on black background to->fg_color = finalcut::fc::Red; to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); // 256 color text and background to->fg_color = finalcut::fc::SpringGreen3; to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); // Bold on (with default colors) @@ -988,7 +988,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017$<2>") ; + , CSI "0;1m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -996,7 +996,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1004,7 +1004,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1012,7 +1012,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1020,7 +1020,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1028,7 +1028,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1036,7 +1036,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;4m\017$<2>") ; + , CSI "0;4m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1044,7 +1044,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1052,7 +1052,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;5m\017$<2>") ; + , CSI "0;5m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1060,7 +1060,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1068,7 +1068,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017$<2>") ; + , CSI "0;7m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1076,7 +1076,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1084,7 +1084,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1;7m\017$<2>") ; + , CSI "0;1;7m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1092,7 +1092,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1100,7 +1100,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1109,7 +1109,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1117,7 +1117,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1125,7 +1125,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1133,7 +1133,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1141,7 +1141,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1149,7 +1149,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1157,7 +1157,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1165,7 +1165,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\016$<2>") ; + , CSI "0m\016$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1173,7 +1173,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017" CSI "0m$<2>") ; + , "\017" CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1181,7 +1181,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1189,7 +1189,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1210,7 +1210,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1;4;7;5m\016$<2>") ; + , CSI "0;1;4;7;5m\016$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1218,7 +1218,7 @@ void FOptiAttrTest::vt100Test() to->fg_color = finalcut::fc::Cyan; to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); // Bold off to->attr.bit.bold = false; @@ -1241,7 +1241,7 @@ void FOptiAttrTest::vt100Test() // Italic off to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1266,7 +1266,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>\016" CSI "7m$<2>") ; + , CSI "0m$<2>\016" CSI "7m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1274,7 +1274,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "m$<2>\016") ; + , CSI "m$<2>\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1283,7 +1283,7 @@ void FOptiAttrTest::vt100Test() CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>\016") ; + , CSI "0m$<2>\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1291,7 +1291,7 @@ void FOptiAttrTest::vt100Test() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>\016") ; + , CSI "0m$<2>\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1299,21 +1299,21 @@ void FOptiAttrTest::vt100Test() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>\016") ; + , CSI "0m$<2>\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Double underline off to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Alternate character set off to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "\017") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1321,14 +1321,14 @@ void FOptiAttrTest::vt100Test() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1415,7 +1415,7 @@ void FOptiAttrTest::xtermTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;1m") ; + , ESC "(B" CSI "0;1m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1438,7 +1438,7 @@ void FOptiAttrTest::xtermTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "34m") ; + , CSI "0m" CSI "34m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1447,7 +1447,7 @@ void FOptiAttrTest::xtermTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "40m") ; + , CSI "31m" CSI "40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1456,7 +1456,7 @@ void FOptiAttrTest::xtermTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "38;5;42m" CSI "48;5;17m") ; + , CSI "38;5;42m" CSI "48;5;17m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1466,7 +1466,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;1m") ; + , ESC "(B" CSI "0;1m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1474,7 +1474,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1482,7 +1482,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;2m") ; + , ESC "(B" CSI "0;2m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1490,7 +1490,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1498,7 +1498,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m" CSI "3m") ; + , ESC "(B" CSI "0m" CSI "3m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1506,7 +1506,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1514,7 +1514,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;4m") ; + , ESC "(B" CSI "0;4m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1522,7 +1522,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1530,7 +1530,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;5m") ; + , ESC "(B" CSI "0;5m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1538,7 +1538,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1546,7 +1546,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;7m") ; + , ESC "(B" CSI "0;7m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1554,7 +1554,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1562,7 +1562,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;7m") ; + , ESC "(B" CSI "0;7m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1570,7 +1570,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1578,7 +1578,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0;8m") ; + , ESC "(B" CSI "0;8m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1586,7 +1586,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1594,7 +1594,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m") ; + , ESC "(B" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1602,7 +1602,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1610,7 +1610,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m" CSI "9m") ; + , ESC "(B" CSI "0m" CSI "9m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1618,7 +1618,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1626,7 +1626,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m" CSI "21m") ; + , ESC "(B" CSI "0m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1634,7 +1634,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1642,7 +1642,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(0" CSI "0m") ; + , ESC "(0" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1650,7 +1650,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m") ; + , ESC "(B" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1658,7 +1658,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B" CSI "0m") ; + , ESC "(B" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1666,7 +1666,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1697,7 +1697,7 @@ void FOptiAttrTest::xtermTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "36m" CSI "44m") ; + , CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1705,7 +1705,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m" CSI "2m") ; + , CSI "22m" CSI "2m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1713,7 +1713,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1721,14 +1721,14 @@ void FOptiAttrTest::xtermTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "23m") ; + , CSI "23m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline off to->attr.bit.underline = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m" CSI "21m") ; + , CSI "24m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1737,7 +1737,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1745,14 +1745,14 @@ void FOptiAttrTest::xtermTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout off to->attr.bit.standout = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1760,7 +1760,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "28m") ; + , CSI "28m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1768,7 +1768,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "36m" CSI "44m" ESC "(0" CSI "9m" CSI "21m") ; + , CSI "0m" CSI "36m" CSI "44m" ESC "(0" CSI "9m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1776,7 +1776,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "29m") ; + , CSI "29m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1784,7 +1784,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1792,7 +1792,7 @@ void FOptiAttrTest::xtermTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(B") ; + , ESC "(B" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1800,14 +1800,14 @@ void FOptiAttrTest::xtermTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "36m" CSI "44m") ; + , CSI "0m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1815,7 +1815,7 @@ void FOptiAttrTest::xtermTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 m ") ; + , "Esc [ 3 9 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1887,7 +1887,7 @@ void FOptiAttrTest::rxvtTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1898,7 +1898,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017" CSI "34m" CSI "47m") ; + , CSI "0;1m\017" CSI "34m" CSI "47m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1909,7 +1909,7 @@ void FOptiAttrTest::rxvtTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "34m") ; + , CSI "0m" CSI "34m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1918,7 +1918,7 @@ void FOptiAttrTest::rxvtTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "40m") ; + , CSI "31m" CSI "40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1927,7 +1927,7 @@ void FOptiAttrTest::rxvtTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32m" CSI "44m") ; + , CSI "32m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1937,7 +1937,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1945,7 +1945,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1953,7 +1953,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1961,7 +1961,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1969,7 +1969,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1977,7 +1977,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1985,7 +1985,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;4m\017") ; + , CSI "0;4m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -1993,7 +1993,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2001,7 +2001,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;5m\017") ; + , CSI "0;5m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2009,7 +2009,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2017,7 +2017,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017") ; + , CSI "0;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2025,7 +2025,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2033,7 +2033,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017") ; + , CSI "0;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2041,7 +2041,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2049,7 +2049,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2058,7 +2058,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2066,7 +2066,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2074,7 +2074,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2082,7 +2082,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "9m") ; + , CSI "0m\017" CSI "9m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2090,7 +2090,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2098,7 +2098,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "21m") ; + , CSI "0m\017" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2106,7 +2106,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2114,7 +2114,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\016") ; + , CSI "0m\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2122,7 +2122,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017" CSI "0m") ; + , "\017" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2130,7 +2130,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2138,7 +2138,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2169,7 +2169,7 @@ void FOptiAttrTest::rxvtTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "36m" CSI "44m") ; + , CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2177,7 +2177,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2185,7 +2185,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2193,14 +2193,14 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline off to->attr.bit.underline = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m" CSI "21m") ; + , CSI "24m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2209,7 +2209,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2217,14 +2217,14 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout off to->attr.bit.standout = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2232,7 +2232,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "28m") ; + , CSI "28m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2240,7 +2240,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "36m" CSI "44m\016" CSI "9m" CSI "21m") ; + , CSI "0m" CSI "36m" CSI "44m\016" CSI "9m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2248,7 +2248,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "29m") ; + , CSI "29m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2256,7 +2256,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2264,7 +2264,7 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017") ; + , "\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2272,14 +2272,14 @@ void FOptiAttrTest::rxvtTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "36m" CSI "44m") ; + , CSI "0m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2287,7 +2287,7 @@ void FOptiAttrTest::rxvtTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 m ") ; + , "Esc [ 3 9 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2360,7 +2360,7 @@ void FOptiAttrTest::linuxTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2371,7 +2371,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017" CSI "34;22m" CSI "47;5m") ; + , CSI "0;1m\017" CSI "34;22m" CSI "47;5m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2382,7 +2382,7 @@ void FOptiAttrTest::linuxTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "34;22m") ; + , CSI "0m\017" CSI "34;22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2391,7 +2391,7 @@ void FOptiAttrTest::linuxTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31;22m" CSI "40;25m") ; + , CSI "31;22m" CSI "40;25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2400,7 +2400,7 @@ void FOptiAttrTest::linuxTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32;1m" CSI "44;25m") ; + , CSI "32;1m" CSI "44;25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2410,7 +2410,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2418,7 +2418,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2426,7 +2426,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2434,7 +2434,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2442,7 +2442,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2450,7 +2450,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2458,7 +2458,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2466,7 +2466,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2474,7 +2474,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;5m\017") ; + , CSI "0;5m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2482,7 +2482,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2490,7 +2490,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017") ; + , CSI "0;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2498,7 +2498,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2506,7 +2506,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017") ; + , CSI "0;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2514,7 +2514,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2522,7 +2522,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2531,7 +2531,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\17") ; + , CSI "0m\17" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2539,7 +2539,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2547,7 +2547,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2555,7 +2555,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2563,7 +2563,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2571,7 +2571,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2579,7 +2579,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2587,7 +2587,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\016") ; + , CSI "0m\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2595,7 +2595,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017" CSI "0m\017") ; + , "\017" CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2603,7 +2603,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "11m") ; + , CSI "0m\017" CSI "11m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2611,7 +2611,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "10m") ; + , CSI "0m\017" CSI "10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2642,7 +2642,7 @@ void FOptiAttrTest::linuxTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "36;22m" CSI "44;25m") ; + , CSI "36;22m" CSI "44;25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2650,7 +2650,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2663,7 +2663,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2676,7 +2676,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2684,14 +2684,14 @@ void FOptiAttrTest::linuxTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout off to->attr.bit.standout = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2699,7 +2699,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2707,7 +2707,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2715,7 +2715,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2723,7 +2723,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "") ; + , "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2731,7 +2731,7 @@ void FOptiAttrTest::linuxTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017") ; + , "\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2739,14 +2739,14 @@ void FOptiAttrTest::linuxTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "10m" CSI "36;22m" CSI "44;25m") ; + , CSI "0m\017" CSI "10m" CSI "36;22m" CSI "44;25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32;22m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32;22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2754,7 +2754,7 @@ void FOptiAttrTest::linuxTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 m ") ; + , "Esc [ 3 9 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2844,7 +2844,7 @@ void FOptiAttrTest::puttyTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2866,7 +2866,7 @@ void FOptiAttrTest::puttyTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "39;49m" CSI "34m") ; + , CSI "0m" CSI "39;49m" CSI "34m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2875,7 +2875,7 @@ void FOptiAttrTest::puttyTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "40m") ; + , CSI "31m" CSI "40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2884,7 +2884,7 @@ void FOptiAttrTest::puttyTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "38;5;42m" CSI "48;5;17m") ; + , CSI "38;5;42m" CSI "48;5;17m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2894,7 +2894,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017") ; + , CSI "0;1m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2902,7 +2902,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2910,7 +2910,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;2m\017") ; + , CSI "0;2m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2918,7 +2918,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2926,7 +2926,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2934,7 +2934,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2942,7 +2942,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;4m\017") ; + , CSI "0;4m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2950,7 +2950,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2958,7 +2958,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;5m\017") ; + , CSI "0;5m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2966,7 +2966,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2974,7 +2974,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017") ; + , CSI "0;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2982,7 +2982,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2990,7 +2990,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1;7m\017") ; + , CSI "0;1;7m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -2998,7 +2998,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3006,7 +3006,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3015,7 +3015,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3023,7 +3023,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3031,7 +3031,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3039,7 +3039,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "9m") ; + , CSI "0m\017" CSI "9m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3047,7 +3047,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3055,7 +3055,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "21m") ; + , CSI "0m\017" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3063,7 +3063,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m") ; + , CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3071,7 +3071,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\016") ; + , CSI "0m\016" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3079,7 +3079,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017" CSI "0m") ; + , "\017" CSI "0m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3087,7 +3087,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017" CSI "11m") ; + , CSI "0m\017" CSI "11m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3095,7 +3095,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "10m") ; + , CSI "0m" CSI "10m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3126,7 +3126,7 @@ void FOptiAttrTest::puttyTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "36m" CSI "44m") ; + , CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3134,7 +3134,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m" CSI "2m") ; + , CSI "22m" CSI "2m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3142,21 +3142,21 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Italic off to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline off to->attr.bit.underline = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m" CSI "21m") ; + , CSI "24m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3165,7 +3165,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3173,14 +3173,14 @@ void FOptiAttrTest::puttyTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout off to->attr.bit.standout = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3188,7 +3188,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "28m") ; + , CSI "28m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3205,7 +3205,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "29m") ; + , CSI "29m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3213,7 +3213,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3221,7 +3221,7 @@ void FOptiAttrTest::puttyTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017") ; + , "\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3229,14 +3229,14 @@ void FOptiAttrTest::puttyTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m" CSI "10m" CSI "36m" CSI "44m") ; + , CSI "0m" CSI "10m" CSI "36m" CSI "44m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "32m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3244,7 +3244,7 @@ void FOptiAttrTest::puttyTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 ; 4 9 m Esc [ 4 4 m ") ; + , "Esc [ 3 9 ; 4 9 m Esc [ 4 4 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3317,7 +3317,7 @@ void FOptiAttrTest::teratermTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017$<2>") ; + , CSI "0;1m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3358,7 +3358,7 @@ void FOptiAttrTest::teratermTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "38;5;10m" CSI "48;5;4m") ; + , CSI "38;5;10m" CSI "48;5;4m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3368,7 +3368,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1m\017$<2>") ; + , CSI "0;1m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3376,7 +3376,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3384,7 +3384,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3392,7 +3392,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3400,7 +3400,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3408,7 +3408,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3416,7 +3416,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;4m\017$<2>") ; + , CSI "0;4m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3424,7 +3424,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3432,7 +3432,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;5m\017$<2>") ; + , CSI "0;5m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3440,7 +3440,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3448,7 +3448,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;7m\017$<2>") ; + , CSI "0;7m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3456,7 +3456,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3464,7 +3464,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0;1;7m\017$<2>") ; + , CSI "0;1;7m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3472,7 +3472,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3480,7 +3480,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3489,7 +3489,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3497,7 +3497,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3505,7 +3505,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3513,7 +3513,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>" CSI "9m") ; + , CSI "0m\017$<2>" CSI "9m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3521,7 +3521,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3529,7 +3529,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>" CSI "21m") ; + , CSI "0m\017$<2>" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3537,7 +3537,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3545,7 +3545,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\016$<2>") ; + , CSI "0m\016$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3553,7 +3553,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017" CSI "0m$<2>") ; + , "\017" CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3561,7 +3561,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m\017$<2>") ; + , CSI "0m\017$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3569,7 +3569,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "0m$<2>") ; + , CSI "0m$<2>" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3600,7 +3600,7 @@ void FOptiAttrTest::teratermTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "38;5;6m" CSI "48;5;4m") ; + , CSI "38;5;6m" CSI "48;5;4m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3613,21 +3613,21 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Italic off to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline off to->attr.bit.underline = false; CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m" CSI "21m") ; + , CSI "24m" CSI "21m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3640,7 +3640,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3653,7 +3653,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "28m") ; + , CSI "28m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3670,7 +3670,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "29m") ; + , CSI "29m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3678,7 +3678,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3686,7 +3686,7 @@ void FOptiAttrTest::teratermTest() to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , "\017") ; + , "\017" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3701,7 +3701,7 @@ void FOptiAttrTest::teratermTest() // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "38;5;2m") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), CSI "38;5;2m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3709,7 +3709,7 @@ void FOptiAttrTest::teratermTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 9 ; 4 9 m Esc [ 4 8 ; 5 ; 4 m ") ; + , "Esc [ 3 9 ; 4 9 m Esc [ 4 8 ; 5 ; 4 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3790,7 +3790,7 @@ void FOptiAttrTest::ibmColorTest() to->fg_color = finalcut::fc::Default; to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3801,7 +3801,7 @@ void FOptiAttrTest::ibmColorTest() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "31m" CSI "107m") ; + , CSI "31m" CSI "107m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3812,7 +3812,7 @@ void FOptiAttrTest::ibmColorTest() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32;40m" CSI "31m") ; + , CSI "32;40m" CSI "31m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3821,7 +3821,7 @@ void FOptiAttrTest::ibmColorTest() to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "34m" CSI "40m") ; + , CSI "34m" CSI "40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3830,7 +3830,7 @@ void FOptiAttrTest::ibmColorTest() to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32m" CSI "41m") ; + , CSI "32m" CSI "41m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3840,105 +3840,105 @@ void FOptiAttrTest::ibmColorTest() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32;40m") ; + , CSI "32;40m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Bold off (with default colors) to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Dim on (with default colors) to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Dim off (with default colors) to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Italic on (with default colors) to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Italic off (with default colors) to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline on (with default colors) to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Underline off (with default colors) to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Blink on (with default colors) to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Blink off (with default colors) to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Reverse on (with default colors) to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Reverse off (with default colors) to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout on (with default colors) to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Standout off (with default colors) to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Invisible on (with default colors) to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( to->encoded_char == ' ' ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -3946,77 +3946,77 @@ void FOptiAttrTest::ibmColorTest() // Invisible off (with default colors) to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Protect on (with default colors) to->attr.bit.protect = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Protect off (with default colors) to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Crossed out on (with default colors) to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Crossed out off (with default colors) to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Double underline on (with default colors) to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Double underline off (with default colors) to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Alternate character set on (with default colors) to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Alternate character set off (with default colors) to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // PC character set on (with default colors) to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // PC character set off (with default colors) to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4036,7 +4036,7 @@ void FOptiAttrTest::ibmColorTest() to->attr.bit.alt_charset = true; to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4045,28 +4045,28 @@ void FOptiAttrTest::ibmColorTest() to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "33m" CSI "41m") ; + , CSI "33m" CSI "41m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Bold off to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Dim off to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Italic off to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4078,14 +4078,14 @@ void FOptiAttrTest::ibmColorTest() // Blink off to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Reverse off to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4097,42 +4097,42 @@ void FOptiAttrTest::ibmColorTest() // Invisible off to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Protect off to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Crossed out off to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Double underline off to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Alternate character set off to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // PC character set off to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4140,7 +4140,7 @@ void FOptiAttrTest::ibmColorTest() to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , CSI "32m") ; + , CSI "32m" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4148,7 +4148,7 @@ void FOptiAttrTest::ibmColorTest() to->fg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( printSequence(oa.changeAttribute(from, to)).c_str() - , "Esc [ 3 2 ; 4 0 m Esc [ 4 1 m ") ; + , "Esc [ 3 2 ; 4 0 m Esc [ 4 1 m " ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4233,7 +4233,7 @@ void FOptiAttrTest::wyse50Test() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G4") ; + , ESC "(" ESC "cD" ESC "G4" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4244,7 +4244,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "Gt") ; + , ESC "(" ESC "cD" ESC "Gt" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4255,7 +4255,7 @@ void FOptiAttrTest::wyse50Test() to->bg_color = finalcut::fc::Default; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4263,7 +4263,7 @@ void FOptiAttrTest::wyse50Test() to->fg_color = finalcut::fc::Red; to->bg_color = finalcut::fc::Black; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4271,7 +4271,7 @@ void FOptiAttrTest::wyse50Test() to->fg_color = finalcut::fc::SpringGreen3; to->bg_color = finalcut::fc::NavyBlue; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4281,7 +4281,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.bold = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G4") ; + , ESC "(" ESC "cD" ESC "G4" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4289,7 +4289,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.bold = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4297,7 +4297,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.dim = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "Gp") ; + , ESC "(" ESC "cD" ESC "Gp" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4305,7 +4305,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.dim = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4313,7 +4313,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.italic = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G0") ; + , ESC "(" ESC "cD" ESC "G0" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4321,7 +4321,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4329,7 +4329,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G8") ; + , ESC "(" ESC "cD" ESC "G8" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4337,7 +4337,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4345,7 +4345,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.blink = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G2") ; + , ESC "(" ESC "cD" ESC "G2" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4353,7 +4353,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.blink = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4361,7 +4361,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.reverse = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G4") ; + , ESC "(" ESC "cD" ESC "G4" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4369,7 +4369,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.reverse = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4377,7 +4377,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.standout = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "Gt") ; + , ESC "(" ESC "cD" ESC "Gt" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4385,7 +4385,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4393,7 +4393,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.invisible = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G1") ; + , ESC "(" ESC "cD" ESC "G1" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4401,7 +4401,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.invisible = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4417,7 +4417,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.protect = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4425,7 +4425,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.crossed_out = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G0") ; + , ESC "(" ESC "cD" ESC "G0" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4433,7 +4433,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.crossed_out = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4441,7 +4441,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.dbl_underline = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G0") ; + , ESC "(" ESC "cD" ESC "G0" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4449,7 +4449,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4457,7 +4457,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.alt_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cE" ESC "G0") ; + , ESC "(" ESC "cE" ESC "G0" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4474,7 +4474,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "cD" ESC "G0") ; + , ESC "(" ESC "cD" ESC "G0" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4482,7 +4482,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4503,7 +4503,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.pc_charset = true; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC ")" ESC "cE" ESC "G\177") ; + , ESC ")" ESC "cE" ESC "G\177" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4511,7 +4511,7 @@ void FOptiAttrTest::wyse50Test() to->fg_color = finalcut::fc::Cyan; to->bg_color = finalcut::fc::Blue; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4539,7 +4539,7 @@ void FOptiAttrTest::wyse50Test() // Italic off to->attr.bit.italic = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4575,7 +4575,7 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.standout = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "G0" ESC "cE" ESC "G1" ESC ")") ; + , ESC "G0" ESC "cE" ESC "G1" ESC ")" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4609,14 +4609,14 @@ void FOptiAttrTest::wyse50Test() // Double underline off to->attr.bit.dbl_underline = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Alternate character set off to->attr.bit.alt_charset = false; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), ESC "cD") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); @@ -4624,14 +4624,14 @@ void FOptiAttrTest::wyse50Test() to->attr.bit.pc_charset = false; CPPUNIT_ASSERT ( *from != *to ); CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to) - , ESC "(" ESC "H\003" ESC "G0" ESC "cD") ; + , ESC "(" ESC "H\003" ESC "G0" ESC "cD" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); // Green text color to->fg_color = finalcut::fc::Green; CPPUNIT_ASSERT ( *from != *to ); - CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "") ; + CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(from, to), "" ); CPPUNIT_ASSERT ( *from == *to ); CPPUNIT_ASSERT ( oa.changeAttribute(from, to) == 0 ); diff --git a/test/foptimove-test.cpp b/test/foptimove-test.cpp index 35c8f0a8..d98f0509 100644 --- a/test/foptimove-test.cpp +++ b/test/foptimove-test.cpp @@ -3,7 +3,7 @@ * * * This file is part of the FINAL CUT widget toolkit * * * -* Copyright 2018-2019 Markus Gans * +* Copyright 2018-2020 Markus Gans * * * * FINAL CUT is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * @@ -20,6 +20,9 @@ * . * ***********************************************************************/ +#include +#include + #include #include #include @@ -27,12 +30,9 @@ #include #include #include - #include #include -#include -#include #include @@ -509,7 +509,7 @@ void FOptiMoveTest::cygwinTest() om.set_parm_left_cursor (CSI "%p1%dD"); CPPUNIT_ASSERT_CSTRING ( printSequence(om.moveCursor (1, 2, 3, 4)).c_str() - , "Esc [ 5 ; 4 H ") ; + , "Esc [ 5 ; 4 H " ); CPPUNIT_ASSERT_CSTRING (om.moveCursor (0, 0, 5, 5), CSI "6;6H"); CPPUNIT_ASSERT_CSTRING (om.moveCursor (5, 5, 0, 0), CSI "H"); CPPUNIT_ASSERT_CSTRING (om.moveCursor (79, 1, 0, 1), "\r"); diff --git a/test/fpoint-test.cpp b/test/fpoint-test.cpp index 7d9a917a..2367d0f0 100644 --- a/test/fpoint-test.cpp +++ b/test/fpoint-test.cpp @@ -328,7 +328,6 @@ void FPointTest::moveTest() p1.move (-2, -7); CPPUNIT_ASSERT ( p1.getX() == 4 ); CPPUNIT_ASSERT ( p1.getY() == -1 ); - } //---------------------------------------------------------------------- diff --git a/test/fstring-test.cpp b/test/fstring-test.cpp index 1a06b2d7..a79aa300 100644 --- a/test/fstring-test.cpp +++ b/test/fstring-test.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/test/fstringstream-test.cpp b/test/fstringstream-test.cpp index fce07dc7..c6214c20 100644 --- a/test/fstringstream-test.cpp +++ b/test/fstringstream-test.cpp @@ -20,6 +20,10 @@ * . * ***********************************************************************/ +#include +#include +#include + #include #include #include @@ -28,8 +32,6 @@ #include #include -#include - #include //---------------------------------------------------------------------- diff --git a/test/ftermcapquirks-test.cpp b/test/ftermcapquirks-test.cpp index 05c265e7..bc82fe26 100644 --- a/test/ftermcapquirks-test.cpp +++ b/test/ftermcapquirks-test.cpp @@ -3,7 +3,7 @@ * * * This file is part of the FINAL CUT widget toolkit * * * -* Copyright 2018-2019 Markus Gans * +* Copyright 2018-2020 Markus Gans * * * * FINAL CUT is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include #include #include @@ -28,7 +30,6 @@ #include #include -#include #include #define CPPUNIT_ASSERT_CSTRING(expected, actual) \ @@ -237,20 +238,20 @@ void FTermcapQuirksTest::generalTest() CPPUNIT_ASSERT ( finalcut::FTermcap::attr_without_color == 0 ); CPPUNIT_ASSERT ( finalcut::FTermcap::can_change_color_palette ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_foreground].string - , CSI "3%p1%dm") ; + , CSI "3%p1%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_background].string - , CSI "4%p1%dm") ; + , CSI "4%p1%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_initialize_color].string , OSC "P%p1%x" "%p2%{255}%*%{1000}%/%02x" "%p3%{255}%*%{1000}%/%02x" "%p4%{255}%*%{1000}%/%02x" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_ca_mode].string - , ESC "7" CSI "?47h" ) ; + , ESC "7" CSI "?47h" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_ca_mode].string - , CSI "?47l" ESC "8" CSI "m") ; + , CSI "?47l" ESC "8" CSI "m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_cursor_address].string - , CSI "%i%p1%d;%p2%dH") ; + , CSI "%i%p1%d;%p2%dH" ); // Non standard ECMA-48 (ANSI X3.64) terminal CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_dbl_underline_mode].string , 0 ); @@ -258,27 +259,27 @@ void FTermcapQuirksTest::generalTest() quirks.terminalFixup(); // Standard ECMA-48 (ANSI X3.64) terminal CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_dbl_underline_mode].string - , CSI "21m") ; + , CSI "21m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_dbl_underline_mode].string - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_bold_mode].string - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_dim_mode].string - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_underline_mode].string - , CSI "24m") ; + , CSI "24m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_blink_mode].string - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_reverse_mode].string - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_secure_mode].string - , CSI "28m") ; + , CSI "28m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_crossed_out_mode].string - , CSI "9m") ; + , CSI "9m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_crossed_out_mode].string - , CSI "29m") ; + , CSI "29m" ); CPPUNIT_ASSERT_CSTRING ( printSequence(caps[finalcut::fc::t_enter_ca_mode].string).c_str() - , "Esc 7 Esc [ ? 4 7 h ") ; + , "Esc 7 Esc [ ? 4 7 h " ); } //---------------------------------------------------------------------- @@ -305,9 +306,9 @@ void FTermcapQuirksTest::xtermTest() "%p3%{255}%*%{1000}%/%2.2X/" "%p4%{255}%*%{1000}%/%2.2X" ESC "\\"); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_cursor_invisible].string - , CSI "?25l") ; + , CSI "?25l" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_cursor_normal].string - , CSI "?12l" CSI "?25h") ; + , CSI "?12l" CSI "?25h" ); detect.setXTerminal (false); } @@ -370,9 +371,9 @@ void FTermcapQuirksTest::cygwinTest() CPPUNIT_ASSERT ( finalcut::FTermcap::background_color_erase == true ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_cursor_invisible].string - , CSI "?25l") ; + , CSI "?25l" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_cursor_visible].string - , CSI "?25h") ; + , CSI "?25h" ); detect.setCygwinTerminal (false); } @@ -396,9 +397,9 @@ void FTermcapQuirksTest::linuxTest() // 8 colors CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_foreground].string - , CSI "3%p1%dm") ; + , CSI "3%p1%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_background].string - , CSI "4%p1%dm") ; + , CSI "4%p1%dm" ); CPPUNIT_ASSERT ( finalcut::FTermcap::attr_without_color == 18 ); // 16 colors @@ -406,9 +407,9 @@ void FTermcapQuirksTest::linuxTest() quirks.terminalFixup(); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_foreground].string - , CSI "3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;22%;m") ; + , CSI "3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;22%;m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_background].string - , CSI "4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m") ; + , CSI "4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m" ); CPPUNIT_ASSERT ( finalcut::FTermcap::attr_without_color == 30 ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_attributes].string @@ -418,17 +419,17 @@ void FTermcapQuirksTest::linuxTest() "%?%p4%t;5%;m" "%?%p9%t\016%e\017%;" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_alt_charset_mode].string - , "\016") ; + , "\016" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_alt_charset_mode].string - , "\017") ; + , "\017" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_attribute_mode].string - , CSI "0m\017") ; + , CSI "0m\017" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_bold_mode].string - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_blink_mode].string - , CSI "25m") ; + , CSI "25m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_reverse_mode].string - , CSI "27m") ; + , CSI "27m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_secure_mode].string , 0 ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_protected_mode].string @@ -436,7 +437,7 @@ void FTermcapQuirksTest::linuxTest() CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_crossed_out_mode].string , 0 ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_orig_pair].string - , CSI "39;49;25m") ; + , CSI "39;49;25m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_dim_mode].string , 0 ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_dim_mode].string @@ -473,17 +474,17 @@ void FTermcapQuirksTest::rxvtTest() data.setTermType ("rxvt-16color"); quirks.terminalFixup(); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_alt_charset_mode].string - , ESC "(0") ; + , ESC "(0" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_alt_charset_mode].string - , ESC "(B") ; + , ESC "(B" ); // urxvt detect.setUrxvtTerminal (true); quirks.terminalFixup(); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_foreground].string - , CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm") ; + , CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_background].string - , CSI "%?%p1%{8}%<%t%p1%'('%+%e%p1%{92}%+%;%dm") ; + , CSI "%?%p1%{8}%<%t%p1%'('%+%e%p1%{92}%+%;%dm" ); detect.setUrxvtTerminal (false); detect.setRxvtTerminal (false); @@ -508,7 +509,7 @@ void FTermcapQuirksTest::vteTest() CPPUNIT_ASSERT ( finalcut::FTermcap::attr_without_color == 0 ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_underline_mode].string - , CSI "24m") ; + , CSI "24m" ); detect.setGnomeTerminal (false); } @@ -563,42 +564,42 @@ void FTermcapQuirksTest::puttyTest() "%?%p4%t;5%;m" "%?%p9%t\016%e\017%;" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_dim_mode].string - , CSI "2m") ; + , CSI "2m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_dim_mode].string - , CSI "22m") ; + , CSI "22m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_clr_bol].string - , CSI "1K") ; + , CSI "1K" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_orig_pair].string - , CSI "39;49m") ; + , CSI "39;49m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_orig_colors].string - , OSC "R") ; + , OSC "R" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_column_address].string - , CSI "%i%p1%dG") ; + , CSI "%i%p1%dG" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_row_address].string - , CSI "%i%p1%dd") ; + , CSI "%i%p1%dd" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enable_acs].string - , ESC "(B" ESC ")0") ; + , ESC "(B" ESC ")0" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_am_mode].string - , CSI "?7h") ; + , CSI "?7h" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_am_mode].string - , CSI "?7l") ; + , CSI "?7l" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_enter_pc_charset_mode].string - , CSI "11m") ; + , CSI "11m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_pc_charset_mode].string - , CSI "10m") ; + , CSI "10m" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_key_mouse].string - , CSI "M") ; + , CSI "M" ); detect.setPuttyTerminal (false); } @@ -622,13 +623,13 @@ void FTermcapQuirksTest::teratermTest() CPPUNIT_ASSERT ( finalcut::FTermcap::eat_nl_glitch == true ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_foreground].string - , CSI "38;5;%p1%dm") ; + , CSI "38;5;%p1%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_set_a_background].string - , CSI "48;5;%p1%dm") ; + , CSI "48;5;%p1%dm" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_exit_attribute_mode].string - , CSI "0m" SI) ; + , CSI "0m" SI ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_orig_pair].string - , CSI "39;49m") ; + , CSI "39;49m" ); detect.setTeraTerm (false); } @@ -652,100 +653,100 @@ void FTermcapQuirksTest::sunTest() CPPUNIT_ASSERT ( finalcut::FTermcap::eat_nl_glitch == true ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_parm_up_cursor].string - , CSI "%p1%dA") ; + , CSI "%p1%dA" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_parm_down_cursor].string - , CSI "%p1%dB") ; + , CSI "%p1%dB" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_parm_right_cursor].string - , CSI "%p1%dC") ; + , CSI "%p1%dC" ); CPPUNIT_ASSERT_CSTRING ( caps[finalcut::fc::t_parm_left_cursor].string - , CSI "%p1%dD") ; + , CSI "%p1%dD" ); for (std::size_t i = 0; finalcut::fc::fkey[i].tname[0] != 0; i++) { if ( std::strncmp(finalcut::fc::fkey[i].tname, "K2", 2) == 0 ) // center of keypad CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "218z") ; + , CSI "218z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kb", 2) == 0 ) // backspace key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , "\b") ; + , "\b" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kD", 2) == 0 && std::strlen(finalcut::fc::fkey[i].tname) == 2 ) // delete-character key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , "\177") ; + , "\177" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "@7", 2) == 0 ) // end key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "220z") ; + , CSI "220z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "k;", 2) == 0 ) // F10 function key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "233z") ; + , CSI "233z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "F1", 2) == 0 ) // F11 function key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "234z") ; + , CSI "234z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "F2", 2) == 0 ) // F12 function key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "235z") ; + , CSI "235z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kh", 2) == 0 ) // home key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "214z") ; + , CSI "214z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kI", 2) == 0 ) // insert-character key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "247z") ; + , CSI "247z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kN", 2) == 0 ) // next-page key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "222z") ; + , CSI "222z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "%7", 2) == 0 ) // options key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "194z") ; + , CSI "194z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kP", 2) == 0 ) // prev-page key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "216z") ; + , CSI "216z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "&5", 2) == 0 ) // resume key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "193z") ; + , CSI "193z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "&8", 2) == 0 ) // undo key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "195z") ; + , CSI "195z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "K2", 2) == 0 ) // center of keypad CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "218z") ; + , CSI "218z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "kDx", 3) == 0 ) // keypad delete CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "249z") ; + , CSI "249z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "@8x", 3) == 0 ) // enter/send key CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "250z") ; + , CSI "250z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "KP1", 3) == 0 ) // keypad slash CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "212z") ; + , CSI "212z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "KP2", 3) == 0 ) // keypad asterisk CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "213z") ; + , CSI "213z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "KP3", 3) == 0 ) // keypad minus sign CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "254z") ; + , CSI "254z" ); if ( std::strncmp(finalcut::fc::fkey[i].tname, "KP4", 3) == 0 ) // keypad plus sign CPPUNIT_ASSERT_CSTRING ( finalcut::fc::fkey[i].string - , CSI "253z") ; + , CSI "253z" ); } detect.setSunTerminal (false); diff --git a/test/ftermdata-test.cpp b/test/ftermdata-test.cpp index d556268b..4bd6bf29 100644 --- a/test/ftermdata-test.cpp +++ b/test/ftermdata-test.cpp @@ -93,8 +93,8 @@ void FTermDataTest::defaultDataTest() CPPUNIT_ASSERT ( data.getTermGeometry() == finalcut::FRect() ); CPPUNIT_ASSERT ( data.getTTYFileDescriptor() == -1 ); CPPUNIT_ASSERT ( data.getBaudrate() == 0 ); - CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "") ; - CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "") ; + CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "" ); + CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "" ); CPPUNIT_ASSERT ( data.getXtermFont() == finalcut::FString() ); CPPUNIT_ASSERT ( data.getXtermTitle() == finalcut::FString() ); CPPUNIT_ASSERT ( data.getExitMessage() == finalcut::FString() ); @@ -178,13 +178,13 @@ void FTermDataTest::dataTest() CPPUNIT_ASSERT ( data.getBaudrate() != 9600 ); CPPUNIT_ASSERT ( data.getBaudrate() == 38400 ); - CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "") ; + CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "" ); data.setTermType("linux"); - CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "linux") ; + CPPUNIT_ASSERT_CSTRING ( data.getTermType(), "linux" ); - CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "") ; + CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "" ); data.setTermFileName("/dev/pts/2"); - CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "/dev/pts/2") ; + CPPUNIT_ASSERT_CSTRING ( data.getTermFileName(), "/dev/pts/2" ); CPPUNIT_ASSERT ( data.getXtermFont() == finalcut::FString() ); data.setXtermFont("terminus-20"); diff --git a/test/ftermdetection-test.cpp b/test/ftermdetection-test.cpp index 8d445403..b79809d2 100644 --- a/test/ftermdetection-test.cpp +++ b/test/ftermdetection-test.cpp @@ -180,14 +180,14 @@ void FTermDetectionTest::ansiTest() CPPUNIT_ASSERT ( ! detect.canDisplay256Colors() ); CPPUNIT_ASSERT ( ! detect.hasTerminalDetection() ); CPPUNIT_ASSERT ( ! detect.hasSetCursorStyleSupport() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "ansi") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "ansi" ); // Test fallback to vt100 without TERM environment variable unsetenv("TERM"); detect.setAnsiTerminal(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isAnsiTerminal() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -310,7 +310,7 @@ void FTermDetectionTest::rxvtTest() CPPUNIT_ASSERT ( detect.canDisplay256Colors() ); CPPUNIT_ASSERT ( detect.hasTerminalDetection() ); CPPUNIT_ASSERT ( ! detect.hasSetCursorStyleSupport() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "rxvt-16color") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "rxvt-16color" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -434,13 +434,13 @@ void FTermDetectionTest::mltermTest() CPPUNIT_ASSERT ( detect.canDisplay256Colors() ); CPPUNIT_ASSERT ( detect.hasTerminalDetection() ); CPPUNIT_ASSERT ( ! detect.hasSetCursorStyleSupport() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "mlterm-256color") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "mlterm-256color" ); setenv ("TERM", "mlterm", 1); unsetenv("COLORFGBG"); detect.detect(); CPPUNIT_ASSERT ( detect.canDisplay256Colors() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "xterm-256color") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "xterm-256color" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -756,7 +756,7 @@ void FTermDetectionTest::ktermTest() detect.setKtermTerminal(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isKtermTerminal() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1011,7 +1011,7 @@ void FTermDetectionTest::linuxTest() detect.setLinuxTerm(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isLinuxTerm() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1083,7 +1083,7 @@ void FTermDetectionTest::freebsdTest() detect.detect(); CPPUNIT_ASSERT ( ! detect.isXTerminal() ); CPPUNIT_ASSERT ( ! detect.isFreeBSDTerm() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1153,7 +1153,7 @@ void FTermDetectionTest::netbsdTest() detect.setNetBSDTerm(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isFreeBSDTerm() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1223,7 +1223,7 @@ void FTermDetectionTest::openbsdTest() detect.setOpenBSDTerm(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isOpenBSDTerm() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1291,7 +1291,7 @@ void FTermDetectionTest::sunTest() detect.setSunTerminal(false); detect.detect(); CPPUNIT_ASSERT ( ! detect.isSunTerminal() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1354,12 +1354,12 @@ void FTermDetectionTest::screenTest() CPPUNIT_ASSERT ( ! detect.canDisplay256Colors() ); CPPUNIT_ASSERT ( detect.hasTerminalDetection() ); CPPUNIT_ASSERT ( ! detect.hasSetCursorStyleSupport() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen" ); setenv ("XTERM_VERSION", "XTerm(312)", 1); detect.detect(); CPPUNIT_ASSERT ( detect.canDisplay256Colors() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen-256color") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen-256color" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1423,12 +1423,12 @@ void FTermDetectionTest::tmuxTest() CPPUNIT_ASSERT ( ! detect.canDisplay256Colors() ); CPPUNIT_ASSERT ( detect.hasTerminalDetection() ); CPPUNIT_ASSERT ( ! detect.hasSetCursorStyleSupport() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen" ); setenv ("VTE_VERSION", "3801", 1); detect.detect(); CPPUNIT_ASSERT ( detect.canDisplay256Colors() ); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen-256color") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "screen-256color" ); printConEmuDebug(); closeConEmuStdStreams(); @@ -1505,17 +1505,17 @@ void FTermDetectionTest::ttytypeTest() // Test /dev/tty3 with linux data.setTermFileName("/dev/tty3"); detect.detect(); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "linux") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "linux" ); // Test /dev/ttyp0 with vt100 data.setTermFileName("/dev/ttyp0"); detect.detect(); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); // Test non-existent /dev/tty8 with fallback to vt100 data.setTermFileName("/dev/tty8"); detect.detect(); - CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100") ; + CPPUNIT_ASSERT_CSTRING ( detect.getTermType(), "vt100" ); printConEmuDebug(); closeConEmuStdStreams(); diff --git a/test/ftermfreebsd-test.cpp b/test/ftermfreebsd-test.cpp index 3d19e7a7..a14a4f00 100644 --- a/test/ftermfreebsd-test.cpp +++ b/test/ftermfreebsd-test.cpp @@ -20,6 +20,11 @@ * . * ***********************************************************************/ +#include + +#include +#include + #include #include #include @@ -27,10 +32,6 @@ #include #include #include -#include - -#include -#include #include "conemu.h" #include diff --git a/test/ftermlinux-test.cpp b/test/ftermlinux-test.cpp index 1d5f4f76..6304adb8 100644 --- a/test/ftermlinux-test.cpp +++ b/test/ftermlinux-test.cpp @@ -1598,15 +1598,15 @@ void FTermLinuxTest::linuxConsoleTest() characters.clear(); - linux.setBeep (20, 100); // Hz < 21 + linux.setBeep (20, 100); // Hz < 21 CPPUNIT_ASSERT ( characters.empty() ); - linux.setBeep (32767, 100); // Hz > 32766 + linux.setBeep (32767, 100); // Hz > 32766 CPPUNIT_ASSERT ( characters.empty() ); - linux.setBeep (200, -1); // ms < 0 + linux.setBeep (200, -1); // ms < 0 CPPUNIT_ASSERT ( characters.empty() ); - linux.setBeep (200, 2000); // ms > 1999 + linux.setBeep (200, 2000); // ms > 1999 CPPUNIT_ASSERT ( characters.empty() ); - linux.setBeep (200, 100); // 200 Hz - 100 ms + linux.setBeep (200, 100); // 200 Hz - 100 ms CPPUNIT_ASSERT ( characters == CSI "10;200]" CSI "11;100]" ); characters.clear(); linux.resetBeep();