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

Tests that a comment typed into a code cell gets its closer auto-inserted, like a bracket does (GH #1641). More...

#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
#include <wx/event.h>
#include <wx/log.h>
#include "CellPointers.h"
#include "Configuration.h"
#include "cells/EditorCell.h"
#include "cells/GroupCell.h"
#include <memory>
#include <catch2/catch.hpp>
Include dependency graph for test_EditorCellAutoCloseComments.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("A typed comment opener gets its closer")
 
 SCENARIO ("A comment opener at the start of a cell with insert-% on")
 
 SCENARIO ("No closer is added where /* opens no comment")
 
 SCENARIO ("Ordinary division and multiplication are left alone")
 
 wxDECLARE_APP (TestApp)
 
int main (int argc, char **argv)
 

Detailed Description

Tests that a comment typed into a code cell gets its closer auto-inserted, like a bracket does (GH #1641).

Typing slash and star adds star and slash after the caret, typing the closer in front of the auto-inserted one jumps over it, and Backspace on an empty comment removes both halves. Inside a string and in text cells nothing happens.

Windowless: real GroupCell/EditorCell against a memory-DC Configuration, the test_EditorCellEscapedParens pattern.