aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/ProtoBufSpec.scala
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-08-01 21:25:11 -0400
committerGitHub2019-08-01 21:25:11 -0400
commitac42287bc47fb8bc6695ae0aaf8f4fee61e129e5 (patch)
tree9c14023a5b242c391ece9063d3bcae7e012deab7 /src/test/scala/firrtlTests/ProtoBufSpec.scala
parent86d2470d8294a4dba37d33ba021558ba33da4d65 (diff)
parent2bf399c240938ba51069348f986fa5d65135a808 (diff)
Merge pull request #1143 from freechipsproject/replace-io-source-with-fileutils
Followup to PR #1142
Diffstat (limited to 'src/test/scala/firrtlTests/ProtoBufSpec.scala')
-rw-r--r--src/test/scala/firrtlTests/ProtoBufSpec.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/scala/firrtlTests/ProtoBufSpec.scala b/src/test/scala/firrtlTests/ProtoBufSpec.scala
index 7a0c3eeb..526a194c 100644
--- a/src/test/scala/firrtlTests/ProtoBufSpec.scala
+++ b/src/test/scala/firrtlTests/ProtoBufSpec.scala
@@ -2,8 +2,6 @@
package firrtlTests
-import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
-
import firrtl.FirrtlProtos.Firrtl
import firrtl._
import firrtl.ir._
@@ -30,8 +28,7 @@ class ProtoBufSpec extends FirrtlFlatSpec {
for (FirrtlResourceTest(name, dir) <- firrtlResourceTests) {
s"$name" should "work with Protobuf serialization and deserialization" in {
- val stream = getClass.getResourceAsStream(s"$dir/$name.fir")
- val circuit = parse(scala.io.Source.fromInputStream(stream).getLines.mkString("\n"))
+ val circuit = parse(FileUtils.getTextResource(s"$dir/$name.fir"))
// Test ToProto and FromProto
val protobuf = proto.ToProto.convert(circuit)