File: benchutil_test.go

package info (click to toggle)
golang-github-sergi-go-diff 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 304 kB
  • sloc: makefile: 38; sh: 15
file content (28 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (2)
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
// Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p/google-diff-match-patch/

package diffmatchpatch

import (
	"io/ioutil"
)

const testdataPath = "../testdata/"

func speedtestTexts() (s1 string, s2 string) {
	d1, err := ioutil.ReadFile(testdataPath + "speedtest1.txt")
	if err != nil {
		panic(err)
	}
	d2, err := ioutil.ReadFile(testdataPath + "speedtest2.txt")
	if err != nil {
		panic(err)
	}

	return string(d1), string(d2)
}