From 32b13fbd8336f301ea99fe1c046569e193e99d14 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 29 Jun 2015 17:47:25 +0200 Subject: Order examples --- ber/class_test.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'ber') diff --git a/ber/class_test.go b/ber/class_test.go index 252d7ae..5803e28 100644 --- a/ber/class_test.go +++ b/ber/class_test.go @@ -3,7 +3,11 @@ package ber import "fmt" func ExampleIdent() { - b := []byte{0x60, 0xA1, 0x02, 0x30, 0x0A, 0x80, 0x7E, 0x04, 0xBE} + b := []byte{ + 0x02, 0x04, 0x0A, 0x30, + 0x40, 0x61, 0x7E, + 0x80, 0xA1, 0xBE, + } for _, v := range b { c, k, t := Ident(v) if c == Universal { @@ -15,13 +19,14 @@ func ExampleIdent() { } } // Output: - // 0x60: Application Constructed 0x00 - // 0xA1: Context-specific Constructed 0x01 // 0x02: Universal Primitive Integer - // 0x30: Universal Constructed Sequence / Of + // 0x04: Universal Primitive Octet String // 0x0A: Universal Primitive Enumerated - // 0x80: Context-specific Primitive 0x00 + // 0x30: Universal Constructed Sequence / Of + // 0x40: Application Primitive 0x00 + // 0x61: Application Constructed 0x01 // 0x7E: Application Constructed 0x1E - // 0x04: Universal Primitive Octet String + // 0x80: Context-specific Primitive 0x00 + // 0xA1: Context-specific Constructed 0x01 // 0xBE: Context-specific Constructed 0x1E } -- cgit v1.2.3