mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Limit vector max size, default is 4096 bits, but may be increased using --max-vector-size.
This commit is contained in:
5
test/test_suite/vector/vector_limit.c3
Normal file
5
test/test_suite/vector/vector_limit.c3
Normal file
@@ -0,0 +1,5 @@
|
||||
fn void main()
|
||||
{
|
||||
double[<65>] x; // #error: Vectors with bitsize over
|
||||
$echo $sizeof(x) * 8;
|
||||
}
|
||||
@@ -81,16 +81,16 @@ fn void test_hash()
|
||||
(uint[<100>]){}.hash();
|
||||
(uint[100]){}.hash();
|
||||
(long){}.hash();
|
||||
(long[<100>]){}.hash();
|
||||
(long[<20>]){}.hash();
|
||||
(long[100]){}.hash();
|
||||
(ulong){}.hash();
|
||||
(ulong[<100>]){}.hash();
|
||||
(ulong[<20>]){}.hash();
|
||||
(ulong[100]){}.hash();
|
||||
(int128){}.hash();
|
||||
(int128[<100>]){}.hash();
|
||||
(int128[<20>]){}.hash();
|
||||
(int128[100]){}.hash();
|
||||
(uint128){}.hash();
|
||||
(uint128[<100>]){}.hash();
|
||||
(uint128[<20>]){}.hash();
|
||||
(uint128[100]){}.hash();
|
||||
(bool){}.hash();
|
||||
(bool[<100>]){}.hash();
|
||||
@@ -122,16 +122,16 @@ fn void test_hash_repeat()
|
||||
assert((uint[<100>]){}.hash() == (uint[<100>]){}.hash());
|
||||
assert((uint[100]){}.hash() == (uint[100]){}.hash());
|
||||
assert((long){}.hash() == (long){}.hash());
|
||||
assert((long[<100>]){}.hash() == (long[<100>]){}.hash());
|
||||
assert((long[<20>]){}.hash() == (long[<20>]){}.hash());
|
||||
assert((long[100]){}.hash() == (long[100]){}.hash());
|
||||
assert((ulong){}.hash() == (ulong){}.hash());
|
||||
assert((ulong[<100>]){}.hash() == (ulong[<100>]){}.hash());
|
||||
assert((ulong[<20>]){}.hash() == (ulong[<20>]){}.hash());
|
||||
assert((ulong[100]){}.hash() == (ulong[100]){}.hash());
|
||||
assert((int128){}.hash() == (int128){}.hash());
|
||||
assert((int128[<100>]){}.hash() == (int128[<100>]){}.hash());
|
||||
assert((int128[<20>]){}.hash() == (int128[<20>]){}.hash());
|
||||
assert((int128[100]){}.hash() == (int128[100]){}.hash());
|
||||
assert((uint128){}.hash() == (uint128){}.hash());
|
||||
assert((uint128[<100>]){}.hash() == (uint128[<100>]){}.hash());
|
||||
assert((uint128[<20>]){}.hash() == (uint128[<20>]){}.hash());
|
||||
assert((uint128[100]){}.hash() == (uint128[100]){}.hash());
|
||||
assert((bool){}.hash() == (bool){}.hash());
|
||||
assert((bool[<100>]){}.hash() == (bool[<100>]){}.hash());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
module std::os::process @test;
|
||||
// Currently disabled as they somewhat mess up the test output.
|
||||
module std::os::process @test @if(false);
|
||||
import std::os, std::io;
|
||||
|
||||
fn void test_inherit_stdio_stdout()
|
||||
|
||||
Reference in New Issue
Block a user