( t *testing.T, store *memory.Store, scope memcontract.Scope, workspace string, filename string, typ memcontract.Type, body string, )
| 758 | } |
| 759 | |
| 760 | func mustWriteMemory( |
| 761 | t *testing.T, |
| 762 | store *memory.Store, |
| 763 | scope memcontract.Scope, |
| 764 | workspace string, |
| 765 | filename string, |
| 766 | typ memcontract.Type, |
| 767 | body string, |
| 768 | ) { |
| 769 | t.Helper() |
| 770 | |
| 771 | target := store |
| 772 | if scope == memcontract.ScopeWorkspace { |
| 773 | target = store.ForWorkspace(workspace) |
| 774 | } |
| 775 | if err := target.Write(scope, filename, []byte(memoryDocument(t, filename, "desc", typ, body))); err != nil { |
| 776 | t.Fatalf("Write(%s) error = %v", filename, err) |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | func memoryDocument(t *testing.T, name string, description string, typ memcontract.Type, body string) string { |
| 781 | t.Helper() |
no test coverage detected