- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for testPrinter (0.25 sec)
-
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
} func (in *TestStruct) DeepCopyObject() runtime.Object { panic("never called") } func TestJSONPrinter(t *testing.T) { testPrinter(t, NewTypeSetter(scheme.Scheme).ToPrinter(&JSONPrinter{}), json.Unmarshal) } func testPrinter(t *testing.T, printer ResourcePrinter, unmarshalFunc func(data []byte, v interface{}) error) { buf := bytes.NewBuffer([]byte{}) err := printer.PrintObj(&testData, buf)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/yaml_test.go
limitations under the License. */ package printers import ( "testing" "sigs.k8s.io/yaml" "k8s.io/client-go/kubernetes/scheme" ) func TestYAMLPrinter(t *testing.T) { testPrinter(t, NewTypeSetter(scheme.Scheme).ToPrinter(&YAMLPrinter{}), yamlUnmarshal) } func yamlUnmarshal(data []byte, v interface{}) error { return yaml.Unmarshal(data, v)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 10 11:23:25 UTC 2021 - 888 bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/TestWriter.java
import java.io.IOException; import java.io.OutputStreamWriter; /** @author Colin Decker */ public class TestWriter extends FilterWriter { private final TestOutputStream out; public TestWriter(TestOption... options) throws IOException { this(new TestOutputStream(ByteStreams.nullOutputStream(), options)); } public TestWriter(TestOutputStream out) { super(new OutputStreamWriter(checkNotNull(out), UTF_8)); this.out = out;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.7K bytes - Viewed (0) -
cmd/kubeadm/app/util/output/output.go
Printf(format string, args ...interface{}) (n int, err error) Println(args ...interface{}) (n int, err error) } // TextPrinter implements Printer interface for generic text output type TextPrinter struct { } // PrintObj is an implementation of ResourcePrinter.PrintObj that prints object func (tp *TextPrinter) PrintObj(obj runtime.Object, writer io.Writer) error { _, err := fmt.Fprintf(writer, "%+v\n", obj) return err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 19 08:22:45 UTC 2024 - 8K bytes - Viewed (0) -
pkg/kube/kclient/clienttest/test_helpers.go
c kclient.ReadWriter[T] t test.Failer TestWriter[T] } type TestWriter[T controllers.Object] struct { c kclient.Writer[T] t test.Failer } func (t TestClient[T]) Get(name, namespace string) T { return t.c.Get(name, namespace) } func (t TestClient[T]) List(namespace string, selector klabels.Selector) []T { return t.c.List(namespace, selector) } func (t TestWriter[T]) Create(object T) T { t.t.Helper()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 23 19:18:21 UTC 2024 - 3.9K bytes - Viewed (0) -
test/fixedbugs/issue15329.go
// Invocation via method expression. check(unsafe.Pointer(reflect.Value.Pointer(testMeth(1))), unsafe.Pointer(reflect.Value.Pointer(testMeth(2)))) // Invocation via interface. check(unsafe.Pointer(testInter(1).Pointer()), unsafe.Pointer(testInter(2).Pointer())) // Invocation via method value. check(unsafe.Pointer(testFunc(1)()), unsafe.Pointer(testFunc(2)())) } func check(p, q unsafe.Pointer) { a, b := *(*int)(p), *(*int)(q)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 18 14:01:22 UTC 2016 - 2.1K bytes - Viewed (0) -
src/go/doc/comment/text.go
// license that can be found in the LICENSE file. package comment import ( "bytes" "fmt" "sort" "strings" "unicode/utf8" ) // A textPrinter holds the state needed for printing a Doc as plain text. type textPrinter struct { *Printer long strings.Builder prefix string codePrefix string width int } // Text returns a textual formatting of the [Doc].
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 8.8K bytes - Viewed (0) -
src/mime/quotedprintable/writer_test.go
// license that can be found in the LICENSE file. package quotedprintable import ( "bytes" "io" "strings" "testing" ) func TestWriter(t *testing.T) { testWriter(t, false) } func TestWriterBinary(t *testing.T) { testWriter(t, true) } func testWriter(t *testing.T, binary bool) { tests := []struct { in, want, wantB string }{ {in: "", want: ""}, {in: "foo bar", want: "foo bar"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 17:36:47 UTC 2022 - 5.1K bytes - Viewed (0) -
pkg/kube/kclient/clienttest/direct.go
// NewWriter returns a new client for the given type. // Any errors will call t.Fatal. func NewWriter[T controllers.ComparableObject](t test.Failer, c kube.Client) TestWriter[T] { return TestWriter[T]{t: t, c: kclient.NewWriteClient[T](c)} } // NewDirectClient returns a new client for the given type. Reads are directly to the API server. // Any errors will call t.Fatal.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 3K bytes - Viewed (0) -
operator/pkg/util/progress/progress.go
return prefix + msg } // For testing only var testWriter *io.Writer func createBar() *pb.ProgressBar { // Don't set a total and use Static so we can explicitly control when you write. This is needed // for handling the multiline issues. bar := pb.New(0) bar.Set(pb.Static, true) if testWriter != nil { bar.SetWriter(*testWriter) } bar.Start()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 19:23:44 UTC 2024 - 6.2K bytes - Viewed (0)