hunk.code_window: 	if s.ExperimentalEnableDefaultChannelLeaveJoinMessages == nil {
   		s.ExperimentalEnableDefaultChannelLeaveJoinMessages = NewBool(true)
   	}
   	if s.ImageProxyType == nil {
   		s.ImageProxyType = NewString("")
   	}
   	if s.ImageProxyURL == nil {
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit: 	if s.ExperimentalGroupUnreadChannels == nil {
   		s.ExperimentalGroupUnreadChannels = NewBool(false)
   	}
  
hunk.file_path: model/config.go
hunk.type: add
file: // Copyright 2016 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 bpf_test
  
  import (
  	"testing"
  
  	"golang.org/x/net/bpf"
  )
  
  func TestVMRetA(t *testing.T) {
  	vm, done, err := testVM(t, []bpf.Instruction{
  		bpf.LoadAbsolute{
  			Off:  8,
  			Size: 1,
  		},
  		bpf.RetA{},
  	})
  	if err != nil {
  		t.Fatalf("failed to load BPF program: %v", err)
  	}
  	defer done()
  
  	out, err := vm.Run([]byte{
  		0xff, 0xff, 0xff, 0xff,
  		0xff, 0xff, 0xff, 0xff,
  		9,
  	})
  	if err != nil {
  		t.Fatalf("unexpected error while running program: %v", err)
  	}
  	if want, got := 1, out; want != got {
  		t.Fatalf("unexpected number of output bytes:\n- want: %d\n-  got: %d",
  			want, got)
  	}
  }
  
  func TestVMRetALargerThanInput(t *testing.T) {
  	vm, done, err := testVM(t, []bpf.Instruction{
  		bpf.LoadAbsolute{
  			Off:  8,
  			Size: 2,
  		},
  		bpf.RetA{},
  	})
  	if err != nil {
  		t.Fatalf("failed to load BPF program: %v", err)
  	}
  	defer done()
  
  	out, err := vm.Run([]byte{
  		0xff, 0xff, 0xff, 0xff,
  		0xff, 0xff, 0xff, 0xff,
  		0, 255,
  	})
  	if err != nil {
  		t.Fatalf("unexpected error while running program: %v", err)
  	}
  	if want, got := 2, out; want != got {
  		t.Fatalf("unexpected number of output bytes:\n- want: %d\n-  got: %d",
  			want, got)
  	}
  }
  
  func TestVMRetConstant(t *testing.T) {
  	vm, done, err := testVM(t, []bpf.Instruction{
  		bpf.RetConstant{
  			Val: 9,
  		},
  	})
  	if err != nil {
  		t.Fatalf("failed to load BPF program: %v", err)
  	}
  	defer done()
  
  	out, err := vm.Run([]byte{
  		0xff, 0xff, 0xff, 0xff,
  		0xff, 0xff, 0xff, 0xff,
  		0, 1,
  	})
  	if err != nil {
  		t.Fatalf("unexpected error while running program: %v", err)
  	}
  	if want, got := 1, out; want != got {
  		t.Fatalf("unexpected number of output bytes:\n- want: %d\n-  got: %d",
  			want, got)
  	}
  }
  
  func TestVMRetConstantLargerThanInput(t *testing.T) {
  	vm, done, err := testVM(t, []bpf.Instruction{
  		bpf.RetConstant{
  			Val: 16,
  		},
  	})
  	if err != nil {
  		t.Fatalf("failed to load BPF program: %v", err)
  	}
  	defer done()
  
  	out, err := vm.Run([]byte{
  		0xff, 0xff, 0xff, 0xff,
  		0xff, 0xff, 0xff, 0xff,
  		0, 1,
  	})
  	if err != nil {
  		t.Fatalf("unexpected error while running program: %v", err)
  	}
  	if want, got := 2, out; want != got {
  		t.Fatalf("unexpected number of output bytes:\n- want: %d\n-  got: %d",
  			want, got)
  	}
  }
  