Skip to content

Commit

Permalink
Release build now compiles again
Browse files Browse the repository at this point in the history
  • Loading branch information
uxmal committed Sep 7, 2015
1 parent 0a91e7d commit 08ebf07
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
/bin/Debug
/obj/Debug
*.suo
/.svn
/src/obj
/src/bin
14 changes: 9 additions & 5 deletions src/Acceptance/ParserAcceptanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ namespace Pytocs.Acceptance
[TestFixture]
public class ParserAcceptanceTests
{
private static readonly string nl = Environment.NewLine;

private string XlatModule(string pyModule)
{
var rdr = new StringReader(pyModule);
Expand Down Expand Up @@ -105,7 +107,8 @@ def on_menuitem_realize(self, menuitem, refactoring):
menuitem.set_state(gtk.STATE_INSENSITIVE)
def on_menuitem_activate(self, menuitem, refactoring):
# Ask user input
" +
" # Ask user input" + @"
args = refactoring.input(
self.model.get_term(),
self.model.get_selection(),
Expand Down Expand Up @@ -157,10 +160,11 @@ def PopupMenu(model):
menu = gtk.Menu()
#menuitem = gtk.MenuItem()
#menuitem.show()
#menu.prepend(menuitem)
" +
" #menuitem = gtk.MenuItem()" + nl +
" #menuitem.show()" + nl +
" #menu.prepend(menuitem)" + nl +
@"
menuitem = gtk.MenuItem(""View"")
viewmenu = ViewMenu(model)
menuitem.set_submenu(viewmenu)
Expand Down
23 changes: 10 additions & 13 deletions src/Translate/StatementTranslator.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,9 @@ public void Stmt_EmptyCommentLine()
public void Stmt_IfWithCommentEmptyCommentLine()
{
var pyStm =
@"if args:
# Comment
args = 0
";
@"if args:"+ nl +
" # Comment"+ nl +
" args = 0" + nl;
var sExp =
@"if (args) {
// Comment
Expand All @@ -733,9 +732,8 @@ public void Stmt_CommentedArg()
var pyStm =
@"foo(
bar,
#baz
)
";
" +" #baz" + nl +
" )" + nl;
var sExp = "foo(bar);\r\n";
Assert.AreEqual(sExp, XlatStmts(pyStm));
}
Expand All @@ -744,12 +742,11 @@ public void Stmt_CommentedArg()
public void Stmt_TrailingComment()
{
var pyStm =
@"try:
bonehead()
#if toast whine.
except:
whine()
";
"try:" + nl +
" bonehead()" + nl +
"#if toast whine." + nl +
"except:" + nl +
" whine()" + nl;
var sExp =
@"try {
bonehead();
Expand Down

0 comments on commit 08ebf07

Please sign in to comment.