MCPcopy Index your code
hub / github.com/256dpi/gcode / TestStripComments

Function TestStripComments

tools_test.go:9–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestStripComments(t *testing.T) {
10 f := &File{
11 Lines: []Line{
12 {
13 Comment: "foo",
14 },
15 {
16 Codes: []GCode{
17 {Comment: "bar"},
18 },
19 },
20 {
21 Codes: []GCode{
22 {Letter: "A"},
23 {Comment: "baz"},
24 },
25 },
26 },
27 }
28
29 StripComments(f)
30
31 assert.Equal(t, &File{
32 Lines: []Line{
33 {
34 Codes: []GCode{
35 {Letter: "A"},
36 },
37 },
38 },
39 }, f)
40}
41
42func TestOffsetXYZ(t *testing.T) {
43 f := &File{

Callers

nothing calls this directly

Calls 1

StripCommentsFunction · 0.85

Tested by

no test coverage detected