Hello thank you for your answer.
Currently the test looks like this. Simplified for the context but should be enough I think.
class MyClass {
public:
friend class MyClassTest;
MyClass() = default;
private:
static const int max_value_ = 50;
static const int measured_value_ = 20;
}
enum class MyEnum {
ONE,
TWO,
THREE
};
int MyClassTest::MyTest(MyEnum e) {
int max_value = MyClass::max_value_;
int measured_value_ = MyClass::measured_value_;
switch(e) {
case MyEnum::ONE: return max_value_ - measured_value_;
case MyEnum::TWO: return max_value_ + measured_value_;
default:
assert(e == MyEnum::THREE);
return max_value_ * measured_value_;
}
}
For this example, i can't modify the class MyClass except that we should remove this `friend` which makes no sense.
Which is why i want to modify MyTest to get the static const value.