approvals / approvals/ApprovalTests.cpp

Ampersand Operator in ut test framework

Open
#157 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

on_hold test_frameworks
Dominant language
C++
Stars
339
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Problem Description

If one uses the ampersand operator like

"example"_test = [&] {
// do some tests
}

This causes that the approval tests files can not be found.

Example Repository: https://github.com/mgnisia/ut-approvaltests-example

Proposed (easy) Solution

  1. Update Documentation for UT: Add this as a special case.
  2. Remove Ampersand in test

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the ampersand test form shown in the report and the linked ut-approvaltests-example repository. Read the UT documentation and approval-file lookup behavior first; done means the special case is documented and the example no longer prevents approval test files from being found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.