Skip to content

Issues building GUnit #96

Open
Open

Description

@DaneR-ctrl

Hi, I'm trying to build and test GUnit and am running into some errors.

I clone each of the libraries and then build a build folder and run cmake ..
After that I run the make command and get the following error.

GUnit/include/GUnit/GSteps.h:580:68: error: use 'template' keyword to treat 'get' as a dependent template name

Activity

  1. chrisdbowen commented on Jan 20, 2025

    @chrisdbowen

    Hi, I'm getting the same error after downloading from master. The fix is in GSteps.h, in GSteps::NextStep()

    "template " needs to be inserted in two places (lines 580 and 583):

    void NextStep() {
       ...
          std::size_t tmp_line{};
          nlohmann::json expected_step{};
          for (const auto& exp_step : pickle_steps_) {
            if (exp_step["text"] == expectedStep.second->name) {
              if (exp_step["text"] == expectedStep.second->name) {
                const auto line = exp_step["locations"].back()["line"].template get<std::size_t>();   // here
                if (line > line_) {
                  expected_step = exp_step;
                  tmp_line = exp_step["locations"].back()["line"].template get<std::size_t>();   // and here
                  break;
                }
              }
            }
          }
        ...
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions