Index: test/webkit/mod-by-zero.js |
diff --git a/test/webkit/resources/standalone-post.js b/test/webkit/mod-by-zero.js |
similarity index 90% |
copy from test/webkit/resources/standalone-post.js |
copy to test/webkit/mod-by-zero.js |
index d157e78bfa084329e2ec1a9b7d6ad456e904c152..e3c51ddf04dc320c1b2852cb48206c0638737d08 100644 |
--- a/test/webkit/resources/standalone-post.js |
+++ b/test/webkit/mod-by-zero.js |
@@ -21,6 +21,12 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-wasPostTestScriptParsed = true; |
+description( |
+"This tests that modulo with zero does not crash but returns NaN." |
+); |
-finishJSTest(); |
+function mod(b) { |
+ return b%b; |
+} |
+ |
+shouldBeNaN("mod(0)"); |