1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.plugin
.multivm
;
13 * This represents the result of a test.
17 public enum VMTestResult
31 /** The mapped exit code. */
32 public final int exitCode
;
35 * Initializes the result with the exit code.
37 * @param __exitCode The exit code.
40 VMTestResult(int __exitCode
)
42 this.exitCode
= __exitCode
;
46 * Decodes the exit value and returns the test result.
48 * @param __exitValue The exit value to decode.
49 * @return The test result.
52 public static VMTestResult
valueOf(int __exitValue
)
54 if (__exitValue
== VMTestResult
.PASS
.exitCode
)
55 return VMTestResult
.PASS
;
56 else if (__exitValue
== VMTestResult
.SKIP
.exitCode
)
57 return VMTestResult
.SKIP
;
58 return VMTestResult
.FAIL
;