~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/rpc/jsonrpc/all_test.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
func (t *Arith) Div(args *Args, reply *Reply) os.Error {
37
37
        if args.B == 0 {
38
 
                return os.ErrorString("divide by zero")
 
38
                return os.NewError("divide by zero")
39
39
        }
40
40
        reply.C = args.A / args.B
41
41
        return nil
51
51
 
52
52
func TestServer(t *testing.T) {
53
53
        type addResp struct {
54
 
                Id     interface{} "id"
55
 
                Result Reply       "result"
56
 
                Error  interface{} "error"
 
54
                Id     interface{} `json:"id"`
 
55
                Result Reply       `json:"result"`
 
56
                Error  interface{} `json:"error"`
57
57
        }
58
58
 
59
59
        cli, srv := net.Pipe()