comparison graal/com.oracle.truffle.ruby.test/src/com/oracle/truffle/ruby/test/RubyTests.java @ 13645:497fada09efb

Ruby: remove versioning.
author Chris Seaton <chris.seaton@oracle.com>
date Wed, 15 Jan 2014 19:27:27 +0000
parents 0fbee3eb71f0
children 3f27e57439ed
comparison
equal deleted inserted replaced
13640:bfe7a8c8c3c6 13645:497fada09efb
49 public static void assertPrintsWithInput(String expectedOutput, String code, String input, String... args) { 49 public static void assertPrintsWithInput(String expectedOutput, String code, String input, String... args) {
50 assertPrints(null, expectedOutput, "(test)", code, input, args); 50 assertPrints(null, expectedOutput, "(test)", code, input, args);
51 } 51 }
52 52
53 /** 53 /**
54 * Executes some Ruby code of a particular version and asserts that it prints an expected
55 * string. Remember to include the newline characters.
56 */
57 public static void assertPrints(RubyVersion rubyVersion, String expectedOutput, String code, String... args) {
58 ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
59 configurationBuilder.setRubyVersion(rubyVersion);
60 assertPrints(new Configuration(configurationBuilder), expectedOutput, "(test)", code, "", args);
61 }
62
63 /**
64 * Executes some Ruby code in a file and asserts that it prints an expected string. Remember to
65 * include the newline characters.
66 */
67 public static void assertFilePrints(String expectedOutput, String fileName, String... args) {
68 assertPrints(null, expectedOutput, fileName, null, "", args);
69 }
70
71 /**
72 * Executes some Ruby code and asserts that it prints an expected string. Remember to include 54 * Executes some Ruby code and asserts that it prints an expected string. Remember to include
73 * the newline characters. Also takes a string to simulate input. 55 * the newline characters. Also takes a string to simulate input.
74 */ 56 */
75 public static void assertPrints(Configuration configuration, String expectedOutput, String fileName, String code, String input, String... args) { 57 public static void assertPrints(Configuration configuration, String expectedOutput, String fileName, String code, String input, String... args) {
76 final ByteArrayOutputStream byteArray = new ByteArrayOutputStream(); 58 final ByteArrayOutputStream byteArray = new ByteArrayOutputStream();