diff options
Diffstat (limited to 'internal/app/export_linux_test.go')
| -rw-r--r-- | internal/app/export_linux_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/app/export_linux_test.go b/internal/app/export_linux_test.go new file mode 100644 index 00000000..73c9df9a --- /dev/null +++ b/internal/app/export_linux_test.go @@ -0,0 +1,24 @@ +package app + +import ( + "hakurei.app/container" + "hakurei.app/internal/app/state" + "hakurei.app/internal/sys" + "hakurei.app/system" +) + +func NewWithID(id state.ID, os sys.State) App { + a := new(app) + a.id = newID(&id) + a.sys = os + return a +} + +func AppIParams(a App, sa SealedApp) (*system.I, *container.Params) { + v := a.(*app) + seal := sa.(*outcome) + if v.outcome != seal || v.id != seal.id { + panic("broken app/outcome link") + } + return seal.sys, seal.container +} |
