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

nasa / trick / 21044401961

15 Jan 2026 07:54PM UTC coverage: 55.668% (-0.2%) from 55.875%
21044401961

Pull #1965

github

web-flow
Merge 971139f89 into 3fa559ade
Pull Request #1965: 1964 methods return size one pointers

90 of 127 new or added lines in 3 files covered. (70.87%)

1023 existing lines in 21 files now uncovered.

12571 of 22582 relevant lines covered (55.67%)

306300.23 hits per line

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

74.07
/trick_source/sim_services/MemoryManager/MemoryManager_ref_attributes.cpp
1

2
#include <string.h>
3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <sstream>
6
#include "trick/MemoryManager.hh"
7
#include "trick/RefParseContext.hh"
8

9
extern int REF_debug;
10

11
REF2 *Trick::MemoryManager::ref_attributes(const char* name) {
13,140✔
12

13
    std::stringstream reference_sstream;
13,140✔
14
    REF2 * result = NULL;
13,140✔
15
    RefParseContext* context = NULL;
13,140✔
16

17
    /** @par Design Details: */
18
    reference_sstream << name;
13,140✔
19

20
    REF_debug = 0;
13,140✔
21

22
    /** @li Create a parse context. */
23
    context = new RefParseContext(this, &reference_sstream);
13,140✔
24

25
    /** @li Call REF_parse to parse the variable reference. */
26
    if (context != NULL) {
13,140✔
27
        int parse_ret = REF_parse(context);
13,140✔
28
        if ( parse_ret == 0) {
13,140✔
29
            /* throw away the reference returned by the ref_parser, it isn't the same
30
               name as requested as "name" */
31
            if ( context->result->reference ) {
13,023✔
32
                free(context->result->reference) ;
13,023✔
33
                context->result->reference = NULL;
13,023✔
34
            }
35
            context->result->reference = strdup(name);
13,023✔
36
            result = context->result;
13,023✔
37
        } else if ( parse_ret == TRICK_PARAMETER_ARRAY_SIZE) {
117✔
38
            /* print out of bounds error message if MM debug_level is greater than 1 */
39
            if (debug_level > 1) {
1✔
40
                std::stringstream message;
×
41
                message << name << " contains out of bounds array index.";
×
UNCOV
42
                emitError(message.str());
×
43
            }
44
        } else if ( parse_ret == TRICK_PARAMETER_ADDRESS_NULL) {
116✔
45
            /* print NULL address error message if MM debug_level is greater than 1 */
46
            if (debug_level > 1) {
×
47
                std::stringstream message;
×
48
                message << name << " contains NULL address.";
×
UNCOV
49
                emitError(message.str());
×
50
            }
51
        }
52
        /** @li Delete the parse context. */
53
        delete( context);
13,140✔
54
    }
55

56
    /** @li Return the the REF2 object.*/
57
    return ( result);
26,280✔
58
}
59

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