Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CL_AUNIT_ASSERT usage in code-pal #236

Closed
larshp opened this issue Nov 13, 2020 · 7 comments · Fixed by #238, #241 or #248
Closed

CL_AUNIT_ASSERT usage in code-pal #236

larshp opened this issue Nov 13, 2020 · 7 comments · Fixed by #238, #241 or #248
Assignees
Labels
enhancement An enhancement or scope enhancement new check New check

Comments

@larshp
Copy link
Contributor

larshp commented Nov 13, 2020

Hi,
according to https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/4e/c2efe26e391014adc9fffe4e204223/content.htm usage of CL_AUNIT_ASSERT is obsolete, I dont think it has any special features over CL_ABAP_UNIT_ASSERT ?

https://github.com/SAP/code-pal-for-abap/search?q=CL_AUNIT_ASSERT

@larshp larshp changed the title CL_AUNIT_ASSERT usage CL_AUNIT_ASSERT usage in code-pal Nov 13, 2020
@lucasborin lucasborin added the enhancement An enhancement or scope enhancement label Nov 16, 2020
@lucasborin lucasborin self-assigned this Nov 16, 2020
@lucasborin
Copy link
Member

How about if we create a check to search for it? (@SAP/code-pal-for-abap-admin)

@estevao-schultz-neto-SAP
Copy link
Contributor

Nice idea! But I think we will have the same known problem as in Y_CHECK_DB_ACCESS_IN_UT when the "failure" is not directly in the examined code (but encapsulated inside of a another call). There are also some frameworks used which do not have the ASSERT directly in the examined/parsed object but where else modularized/encapsulated. Got my point?

@lucasborin
Copy link
Member

Hm, I see. We can configure the check to run in the test and non-test code, so it covers all the objects. It is a simple read table in the tokens searching for the class name (CL_AUNIT_ASSERT).

@lucasborin
Copy link
Member

lucasborin commented Nov 16, 2020

if_Aunit_Constants is also deprecated, and we should use the IF_ABAP_UNIT_CONSTANT instead

lucasborin added a commit that referenced this issue Nov 16, 2020
lucasborin added a commit that referenced this issue Nov 16, 2020
@lucasborin lucasborin linked a pull request Nov 16, 2020 that will close this issue
@estevao-schultz-neto-SAP
Copy link
Contributor

estevao-schultz-neto-SAP commented Nov 16, 2020

Is it an ENHANCEMENT or NEW CHECK ?

@lucasborin
Copy link
Member

Both:

  • ENHANCEMENT (see pull request Deprecated AUnit #238) to change the deprecated interface and class in the code-pal source;
  • NEW CHECK to enhance code-pal scope.

lucasborin added a commit that referenced this issue Nov 16, 2020
* solves #236

* solves #236
@lucasborin lucasborin linked a pull request Nov 16, 2020 that will close this issue
@lucasborin
Copy link
Member

Ps: IF_ABAP_UNIT_CONSTANT does not exist in ABAP 7.40

lucasborin added a commit that referenced this issue Nov 16, 2020
* solves #225 (#231)

* Update changelog.txt

* y_object_creation_date, fix newlines between methods (#233)

* solves #219 (#235)

* Update changelog.txt

* solves 234 (#237)

and improve buffer

* Update changelog.txt

* Minor Refactoring (#240)

* Version 1.08.0

* disabling sorter unit test (compatibility to 7.40)

* Deprecated AUnit (#238)

* solves #236

* solves #236

* Update changelog.txt

* Reverting IF_ABAP_UNIT_CONSTANT

Not compatible to ABAP 7.40 (see #241)

Co-authored-by: Lars Hvam <larshp@hotmail.com>
@lucasborin lucasborin reopened this Nov 16, 2020
@lucasborin lucasborin added the new check New check label Nov 16, 2020
lucasborin added a commit that referenced this issue Nov 19, 2020
@lucasborin lucasborin linked a pull request Nov 19, 2020 that will close this issue
lucasborin added a commit that referenced this issue Nov 23, 2020
* new check #236

* Update check_documentation.md

* Create deprecated-classes.md

* Update check_documentation.md

* Update y_demo_failures.clas.abap
lucasborin added a commit that referenced this issue Nov 23, 2020
* regression feature (#245)

* Update changelog.txt

* fixing typo (#247)

* Update changelog.txt

* Update changelog.txt

* Split 'Check LOOP' check (#246)

* solves #223

* Update check_documentation.md

* Create check-in-loop.md

* Update check-in-loop.md

* Update check-in-loop.md

* Update check-statement-position.md

* Update check-in-loop.md

Co-authored-by: estevao-schultz-neto-SAP <63100656+estevao-schultz-neto-SAP@users.noreply.github.com>

* Update changelog.txt

* Coverage Thresholds  (#249)

* solves #243

* versioning check

* fixing version

* Update changelog.txt

* Update check_documentation.md

* Create deprecated-classes.md

* Update check_documentation.md

* Delete deprecated-classes.md

* Deprecated Classes (#248)

* new check #236

* Update check_documentation.md

* Create deprecated-classes.md

* Update check_documentation.md

* Update y_demo_failures.clas.abap

* Update changelog.txt

* fixing dump (c_info > c_note)

* new version

* solves #252

* solves #198

Co-authored-by: estevao-schultz-neto-SAP <63100656+estevao-schultz-neto-SAP@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or scope enhancement new check New check
Projects
None yet
3 participants