mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
* Updates to stub generation * More idiomatic fixes from PHP team * Moved tests from src/tests -> tests, got rid of extension-only tests * fixed up test paths, regenerated arginfo
30 lines
745 B
PHP
30 lines
745 B
PHP
<?php
|
|
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
use AWS\CRT\CRT;
|
|
|
|
final class ErrorTest extends PHPUnit_Framework_TestCase {
|
|
private static $crt = null;
|
|
public static function setUpBeforeClass() {
|
|
self::$crt = new CRT();
|
|
}
|
|
|
|
public static function tearDownAfterClass() {
|
|
self::$crt = null;
|
|
}
|
|
|
|
public function testNoInitialError() {
|
|
$this->assertEquals(0, CRT::last_error());
|
|
}
|
|
|
|
public function testCanResolveErrorName() {
|
|
$this->assertEquals("AWS_ERROR_SUCCESS", CRT::error_name(0));
|
|
}
|
|
|
|
public function testCanResolveErrorStr() {
|
|
$this->assertEquals("Success.", CRT::error_str(0));
|
|
}
|
|
}
|