Skip to content

Commit

Permalink
Ignoring missing includes, for now. #109
Browse files Browse the repository at this point in the history
  • Loading branch information
kraigher committed Feb 4, 2016
1 parent 6c0d02e commit ec9134f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vunit/parsing/verilog/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def preprocess(tokens, defines=None, include_paths=None, included_files=None):
if exists(full_name):
break
else:
assert False
continue
included_files.append(full_name)
with open(full_name, "r") as fptr:
included_tokens = tokenize(fptr.read())
Expand Down
8 changes: 8 additions & 0 deletions vunit/test/unit/test_verilog_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ def test_preprocess_include_directive(self):
self.assertEqual(tokens, tokenize("hello hey"))
self.assertEqual(included_files, [join(self.output_path, "include.svh")])

def test_preprocess_include_directive(self):
included_files = []
tokens = preprocess(tokenize('`include "include.svh"'),
include_paths=[self.output_path],
included_files=included_files)
self.assertEqual(tokens, tokenize(""))
self.assertEqual(included_files, [])

def write_file(self, file_name, contents):
"""
Write file with contents into output path
Expand Down

0 comments on commit ec9134f

Please sign in to comment.