MCPcopy Index your code
hub / github.com/cloudfoundry/java-buildpack-memory-calculator / TestStack

Function TestStack

memory/stack_test.go:27–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestStack(t *testing.T) {
28 spec.Run(t, "Stack", func(t *testing.T, when spec.G, it spec.S) {
29
30 g := NewGomegaWithT(t)
31
32 it("formats", func() {
33 g.Expect(memory.Stack(memory.Kibi).String()).To(Equal("-Xss1K"))
34 })
35
36 it("matches -Xss", func() {
37 g.Expect(memory.IsStack("-Xss1K")).To(BeTrue())
38 })
39
40 it("does not match non -Xss", func() {
41 g.Expect(memory.IsStack("-Xmx1K")).To(BeFalse())
42 })
43
44 it("parses", func() {
45 g.Expect(memory.ParseStack("-Xss1K")).To(Equal(memory.Stack(memory.Kibi)))
46 })
47
48 })
49}

Callers

nothing calls this directly

Calls 4

StackTypeAlias · 0.92
IsStackFunction · 0.92
ParseStackFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected