• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nasa / trick / 25456501308

06 May 2026 07:29PM UTC coverage: 55.935% (-0.8%) from 56.7%
25456501308

Pull #2011

github

web-flow
Merge 7ad262960 into 7054e405e
Pull Request #2011: Single-file CI and code style adoption

14612 of 26123 relevant lines covered (55.94%)

462107.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/trick_source/sim_services/MonteCarlo/MonteVarFixed.cpp
1
#include <sstream>
2
#include <iomanip>
3

4
#include "trick/MonteVarFixed.hh"
5

6
Trick::MonteVarFixed::MonteVarFixed(std::string in_name, double in_value, std::string in_unit) {
1✔
7
    this->name = in_name;
1✔
8
    set_value(in_value);
1✔
9
    this->unit = in_unit;
1✔
10
}
1✔
11

12
// Composite the various properties of this MonteVarFixed.
13
std::string Trick::MonteVarFixed::describe_variable()
×
14
{
15
    std::stringstream ss;
×
16

17
    ss << "#NAME:\t\t" << this->name << "\n"
×
18
       << "#TYPE:\t\tFIXED\n" 
19
       << "#UNIT:\t\t" << this->unit << "\n"
×
20
       << "#VALUE:\t\t" << this->value << "\n";
×
21

22
    return ss.str();
×
23
}
×
24

25
void Trick::MonteVarFixed::set_value(double in_value) {
1✔
26
    std::ostringstream string_stream;
1✔
27
    string_stream << std::setprecision(15) << in_value ;
1✔
28
    this->value = string_stream.str();
1✔
29
}
1✔
30

31
std::string Trick::MonteVarFixed::get_next_value() {
1✔
32
    std::ostringstream string_stream;
1✔
33
    if (unit.empty()) {
1✔
34
        string_stream << name << " = " << value;
1✔
35
    }
36
    else {
37
        string_stream << name << " = trick.attach_units(\"" << unit << "\", " << value << ")";
×
38
    }
39
    return string_stream.str();
2✔
40
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc