summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-08-12 23:15:14 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-08-12 23:15:14 -0400
commit254830b86da314bed23f44230710e1ba221af4c9 (patch)
tree8aa5c9c36c67e62e0eee911cadea21fb2ea3e263 /decoder
parent2c4453984060dd039b8a99e5a8d98dbc107588b9 (diff)
nasty unit test failure
Diffstat (limited to 'decoder')
-rw-r--r--decoder/hg_test.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/decoder/hg_test.h b/decoder/hg_test.h
index 2e308c37..c098961d 100644
--- a/decoder/hg_test.h
+++ b/decoder/hg_test.h
@@ -64,12 +64,20 @@ Name HGjsons[]= {
}
+void AddNullEdge(Hypergraph* hg) {
+ TRule x;
+ x.arity_ = 0;
+ hg->nodes_[0].in_edges_.push_back(hg->AddEdge(TRulePtr(new TRule(x)), Hypergraph::TailNodeVector())->id_);
+}
+
void HGSetup::CreateTinyLatticeHG(Hypergraph* hg) {
Json(hg,HGjsons[TinyLatticeHG]);
+ AddNullEdge(hg);
}
void HGSetup::CreateLatticeHG(Hypergraph* hg) {
Json(hg,HGjsons[LatticeHG]);
+ AddNullEdge(hg);
}
void HGSetup::CreateHG_tiny(Hypergraph* hg) {