MCPcopy
hub / github.com/google/go-cmp / project1Tests

Function project1Tests

cmp/compare_test.go:2571–2688  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2569}
2570
2571func project1Tests() []test {
2572 const label = "Project1"
2573
2574 ignoreUnexported := cmpopts.IgnoreUnexported(
2575 ts.EagleImmutable{},
2576 ts.DreamerImmutable{},
2577 ts.SlapImmutable{},
2578 ts.GoatImmutable{},
2579 ts.DonkeyImmutable{},
2580 ts.LoveRadius{},
2581 ts.SummerLove{},
2582 ts.SummerLoveSummary{},
2583 )
2584
2585 createEagle := func() ts.Eagle {
2586 return ts.Eagle{
2587 Name: "eagle",
2588 Hounds: []string{"buford", "tannen"},
2589 Desc: "some description",
2590 Dreamers: []ts.Dreamer{{}, {
2591 Name: "dreamer2",
2592 Animal: []interface{}{
2593 ts.Goat{
2594 Target: "corporation",
2595 Immutable: &ts.GoatImmutable{
2596 ID: "southbay",
2597 State: (*pb.Goat_States)(newInt(5)),
2598 Started: now,
2599 },
2600 },
2601 ts.Donkey{},
2602 },
2603 Amoeba: 53,
2604 }},
2605 Slaps: []ts.Slap{{
2606 Name: "slapID",
2607 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2608 Immutable: &ts.SlapImmutable{
2609 ID: "immutableSlap",
2610 MildSlap: true,
2611 Started: now,
2612 LoveRadius: &ts.LoveRadius{
2613 Summer: &ts.SummerLove{
2614 Summary: &ts.SummerLoveSummary{
2615 Devices: []string{"foo", "bar", "baz"},
2616 ChangeType: []pb.SummerType{1, 2, 3},
2617 },
2618 },
2619 },
2620 },
2621 }},
2622 Immutable: &ts.EagleImmutable{
2623 ID: "eagleID",
2624 Birthday: now,
2625 MissingCall: (*pb.Eagle_MissingCalls)(newInt(55)),
2626 },
2627 }
2628 }

Callers 1

TestDiffFunction · 0.85

Calls 3

IgnoreUnexportedFunction · 0.92
ComparerFunction · 0.92
newIntFunction · 0.85

Tested by

no test coverage detected