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

rokucommunity / brs / #310

01 Dec 2023 08:37PM UTC coverage: 91.498% (+1.0%) from 90.458%
#310

push

TwitchBronBron
0.45.3

1784 of 2079 branches covered (85.81%)

Branch coverage included in aggregate %.

5265 of 5625 relevant lines covered (93.6%)

8959.42 hits per line

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

73.68
/src/stdlib/GlobalUtilities.ts
1
import {
131✔
2
    Callable,
3
    ValueKind,
4
    BrsInvalid,
5
    BrsString,
6
    BrsType,
7
    StdlibArgument,
8
    RoAssociativeArray,
9
    BrsInterface,
10
} from "../brsTypes";
11
import { BrsComponent } from "../brsTypes/components/BrsComponent";
12

13
let warningShown = false;
131✔
14

15
export const RebootSystem = new Callable("RebootSystem", {
131✔
16
    signature: {
17
        args: [],
18
        returns: ValueKind.Void,
19
    },
20
    impl: () => {
21
        if (!warningShown) {
×
22
            console.warn("`RebootSystem` is not implemented in `brs`.");
×
23
            warningShown = true;
×
24
        }
25

26
        return BrsInvalid.Instance;
×
27
    },
28
});
29

30
export const GetInterface = new Callable("GetInterface", {
131✔
31
    signature: {
32
        args: [
33
            new StdlibArgument("object", ValueKind.Object),
34
            new StdlibArgument("ifname", ValueKind.String),
35
        ],
36
        returns: ValueKind.Interface,
37
    },
38
    impl: (interpreter, object: BrsComponent, ifname: BrsString): BrsInterface | BrsInvalid => {
39
        return object.interfaces.get(ifname.value.toLowerCase()) || BrsInvalid.Instance;
4✔
40
    },
41
});
42

43
export const FindMemberFunction = new Callable("FindMemberFunction", {
131✔
44
    signature: {
45
        args: [
46
            new StdlibArgument("object", ValueKind.Object),
47
            new StdlibArgument("funname", ValueKind.String),
48
        ],
49
        returns: ValueKind.Interface,
50
    },
51
    impl: (interpreter, object: BrsComponent, funName: BrsString): BrsInterface | BrsInvalid => {
52
        let iface: BrsType = BrsInvalid.Instance;
5✔
53
        object.interfaces.forEach((interfaceName) => {
5✔
54
            if (interfaceName.methodNames.has(funName.value.toLowerCase())) {
22✔
55
                iface = interfaceName;
4✔
56
            }
57
        });
58

59
        return iface;
5✔
60
    },
61
});
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