Added more tests

This commit is contained in:
2026-07-04 21:55:29 +02:00
parent a1fd169568
commit f30613f094
10 changed files with 367 additions and 0 deletions
+20
View File
@@ -72,9 +72,29 @@ pub void test_multiple_impls()
assert_eq!(c.y, 6);
}
struct Wrapper<T>
{
T value;
}
impl<T: Copy> Wrapper<T>
{
pub T get(&self)
{
self.value
}
}
pub void test_impl_generic()
{
Wrapper<i32> w = Wrapper { value: 42 };
assert_eq!(w.get(), 42);
}
pub void run_tests()
{
test_inherent_impl();
test_trait_impl_block();
test_multiple_impls();
test_impl_generic();
}