Skip to content

Commit

Permalink
Add unit tests for parser.
Browse files Browse the repository at this point in the history
These tests were transferred from the parser tests from
google/go-jsonnet

Issue #39
  • Loading branch information
davidzchen committed Mar 24, 2016
1 parent 334a225 commit 0866ee5
Show file tree
Hide file tree
Showing 2 changed files with 433 additions and 4 deletions.
26 changes: 22 additions & 4 deletions core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package(default_visibility = ["//visibility:public"])
cc_library(
name = "common",
hdrs = [
"unicode.h",
"ast.h",
"static_error.h",
"unicode.h",
],
includes = ["."],
)
Expand All @@ -28,22 +29,38 @@ cc_test(
],
)

cc_library(
name = "parser",
srcs = ["parser.cpp"],
hdrs = ["parser.h"],
deps = [
":common",
":lexer",
],
)

cc_test(
name = "parser_test",
srcs = ["parser_test.cc"],
deps = [
":parser",
"//external:gtest_main",
],
)

cc_library(
name = "jsonnet-common",
srcs = [
"desugarer.cpp",
"formatter.cpp",
"libjsonnet.cpp",
"parser.cpp",
"static_analysis.cpp",
"string_utils.cpp",
"vm.cpp",
],
hdrs = [
"ast.h",
"desugarer.h",
"formatter.h",
"parser.h",
"state.h",
"static_analysis.h",
"string_utils.h",
Expand All @@ -52,6 +69,7 @@ cc_library(
deps = [
":common",
":lexer",
":parser",
"//include:libjsonnet",
"//stdlib:std",
],
Expand Down
Loading

0 comments on commit 0866ee5

Please sign in to comment.