Skip to content

Commit

Permalink
DanielWagnerHall: Include C# in inconsistency checking
Browse files Browse the repository at this point in the history
r13192
  • Loading branch information
illicitonion committed Aug 2, 2011
1 parent 9efb3ec commit a8ff7df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wire.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ def __init__(self, path_to_error_codes):
def extract_from_match(self, match):
return match.group(1), int(match.group(2))

class CSharpErrorCodeGatherer(AbstractErrorCodeGatherer):
def __init__(self, path_to_error_codes):
super(CSharpErrorCodeGatherer, self).__init__( \
'C#',
path_to_error_codes, \
re.compile('^\s*(([A-Z][a-z]*)+) = (\d+)'))

def extract_from_match(self, match):
return match.group(1), int(match.group(len(match.groups())))

class ErrorCodeChecker(object):
def __init__(self):
self.gatherers = []
Expand Down Expand Up @@ -366,6 +376,7 @@ def main():
.using(RubyErrorCodeGatherer('rb/lib/selenium/webdriver/common/error.rb')) \
.using(PythonErrorCodeGatherer('py/selenium/webdriver/remote/errorhandler.py')) \
.using(CErrorCodeGatherer('cpp/webdriver-interactions/errorcodes.h')) \
.using(CSharpErrorCodeGatherer('dotnet/src/WebDriver/WebDriverResult.cs')) \
.check_error_codes_are_consistent(error_codes)

resources = []
Expand Down

0 comments on commit a8ff7df

Please sign in to comment.