Menu

#327 Comment sequences in strings are interpreted wrong

v1.1.x
fixed
critical (96)
v1.1.0
Bug Fix
2018-05-15
2018-05-08
Erik Hänel
No

In procedures, if one uses comment sequences in strings, i.e. somevar = "this ## comment sequence";, then NumeRe will cut the second part of the string.

Analysis:
In the ProcedureElement class, the constructor

ProcedureElement::ProcedureElement(const vector<string>& vProcedureContents)

will only look for ##, #* and *#. It does not consider counting the string quotation marks. Change this behavior.

Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
The fix was documented in the changes log. Further documentation not needed.

Tests:
The fix was added to the automatic string tests. No deviation detected. Bug fix implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2018-05-08
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-05-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     In procedures, if one uses comment sequences in strings, i.e. `somevar = "this ## comment sequence";`, then NumeRe will cut the second part of the string.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-05-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,12 @@
     In procedures, if one uses comment sequences in strings, i.e. `somevar = "this ## comment sequence";`, then NumeRe will cut the second part of the string.
    
     **Analysis:**
    +In the `ProcedureElement` class, the constructor
    +
    
    +    :::C++
    +    ProcedureElement::ProcedureElement(const vector<string>& vProcedureContents)
    +    
    +will only look for `##`, `#*` and `*#`. It does not consider counting the string quotation marks. Change this behavior.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-05-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -9,7 +9,9 @@
     will only look for `##`, `#*` and `*#`. It does not consider counting the string quotation marks. Change this behavior.
    
     **Implementation:**
    +The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +The fix was documented in the changes log. Further documentation not needed.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2018-05-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -15,3 +15,4 @@
     The fix was documented in the changes log. Further documentation not needed.
    
     **Tests:**
    +The fix was added to the automatic string tests. No deviation detected. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB