Permalink
Browse files

Got tests passing by fixing broken mxmlc stub

  • Loading branch information...
1 parent ca60367 commit a6bb69e56c0dfa473b309277ca40dcc1283df936 @lukebayes committed Jun 12, 2011
Showing with 7 additions and 7 deletions.
  1. +0 −1 lib/flashsdk/mxmlc.rb
  2. +7 −4 test/fixtures/sdk/mxmlc
  3. +0 −2 test/unit/mxmlc_test.rb
@@ -120,7 +120,6 @@ class MXMLC < CompilerBase
def execute
duration = Benchmark.measure { super }
- puts ">> EXECUTE WITH: #{binary_path} and: #{output}"
Sprout.stdout.puts "[MXMLC] Compilation complete in #{duration.real} seconds." unless use_fcsh?
end
@@ -12,12 +12,15 @@ class FakeMXMLC
def initialize args
#puts ">> ARGS: #{args.inspect}"
- if(args.size == 1 &&
- args[0] == "-static-link-runtime-shared-libraries" &&
- args[1] == "test/fixtures/mxmlc/simple/SomeFile.as")
+ if(args.size == 3 &&
+ args[0].include?('SomeFile.swf') &&
+ args[1].include?('-static-link-runtime-shared-libraries') &&
+ args[2].include?('SomeFile.as'))
compile_simple_swf args
elsif args == ["-output=test/fixtures/air/simple/bin/SomeProject.swf", "-static-link-runtime-shared-libraries", "test/fixtures/air/simple/SomeProject.as"]
compile_amxmlc_swf args
+ else
+ raise "Unexpected args sent to mxmlc stub #{args.join(', ')}"
end
end
@@ -33,7 +36,7 @@ class FakeMXMLC
# Loading configuration file /Users/lbayes/Library/Sprouts/1.0/cache/flex4/4.1.0.16076/frameworks/flex-config.xml
# /Users/lbayes/Projects/Sprouts/flashsdk/test/fixtures/mxmlc/simple/SomeFile.swf (558 bytes)
def compile_simple_swf args
- path = File.expand_path(args[1].gsub(/\.as$/, '.swf'))
+ path = File.expand_path(args[0].gsub(/-output=/, ''))
compile_swf path
end
@@ -25,8 +25,6 @@ class MXMLCTest < Test::Unit::TestCase
mxmlc.input = @input
mxmlc.output = @expected_output
mxmlc.execute
- puts "--------------------"
- puts mxmlc.to_shell
assert_file @expected_output
end
end

0 comments on commit a6bb69e

Please sign in to comment.