-
Notifications
You must be signed in to change notification settings - Fork 28
/
vlv_test.go
45 lines (39 loc) · 860 Bytes
/
vlv_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ldap
import (
"fmt"
"testing"
)
/*
type ControlVlvRequest struct {
Criticality bool
BeforeCount int32
AfterCount int32
ByOffset []int32
GreaterThanOrEqual string
ContextID []byte
}
*/
func TestVlvRequest(t *testing.T) {
fmt.Println("TestVlvRequest starting...")
vlv := new(ControlVlvRequest)
vlv.BeforeCount = 0
vlv.AfterCount = 10
offset := new(VlvOffSet)
offset.Offset = 1
offset.ContentCount = 10
vlv.ByOffset = offset
VlvDebug = true
p, err := vlv.Encode()
if err != nil {
t.Error(err)
}
// ber.PrintPacket(p)
// ber.PrintBytes(p)
if p != nil {
fmt.Printf("")
}
fmt.Println("TestVlvRequest finsished.")
}