Benchmark Rust against pinned C# reference (#105)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 1m8s
Native code generation / deterministic (push) Failing after 2m6s
Concurrency and resource soak audit / soak (push) Failing after 12m13s
Documentation / documentation (push) Failing after 1m36s
Imaging and meshing gate / native (push) Failing after 3m2s
JPEG 2000 feature / linux (push) Successful in 2m48s
performance evidence / audit (push) Failing after 13m49s
Release platform and feature matrix / audit (push) Successful in 44s
Native Rust workspace compile / compile (push) Failing after 55s
Skia feature / linux (push) Successful in 31m13s
Dependency and supply-chain audit / audit (push) Failing after 9m13s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Failing after 9m49s
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled

This commit is contained in:
2026-08-12 03:26:56 +00:00
parent b71386dc31
commit 738fe3933e
27 changed files with 4746 additions and 21 deletions

View File

@@ -0,0 +1,44 @@
use std::sync::Arc;
use libremetaverse::imaging::Targa;
use libremetaverse::{GridClient, Inventory, InventoryItem};
use libremetaverse_types::{AssetType, UUID};
#[test]
fn root_inventory_updates_preserve_link_index() {
let client = Arc::new(GridClient::new().expect("offline client"));
let inventory = Inventory::new_with_grid_client_uuid(client, UUID::zero()).expect("store");
let item_id = UUID::new_with_u_int64(1).expect("item UUID");
let first_target = UUID::new_with_u_int64(2).expect("first target");
let second_target = UUID::new_with_u_int64(3).expect("second target");
let mut item = InventoryItem::new_with_uuid(item_id).expect("item");
item.set_asset_type(AssetType::Link);
item.set_asset_uuid(first_target);
inventory.update_node_for(&item).expect("insert root link");
assert_eq!(inventory.find_all_links(first_target).unwrap().len(), 1);
item.set_asset_uuid(second_target);
inventory
.update_node_for(&item)
.expect("retarget root link");
assert!(inventory.find_all_links(first_target).unwrap().is_empty());
assert_eq!(inventory.find_all_links(second_target).unwrap().len(), 1);
item.set_asset_type(AssetType::Texture);
inventory.update_node_for(&item).expect("replace link");
assert!(inventory.find_all_links(second_target).unwrap().is_empty());
assert_eq!(inventory.count(), 1);
}
#[test]
fn borrowed_tga_fast_path_preserves_fixture_pixels() {
let bytes = include_bytes!("../../../benchmarks/fixtures/image.tga");
let image = Targa::decode_to_managed_image_with_bytes(bytes).expect("decode TGA fixture");
assert_eq!((image.width, image.height), (128, 128));
assert_eq!(image.red.len(), 128 * 128);
assert_eq!(
(&image.red[..4], &image.green[..4], &image.blue[..4]),
(&[0, 1, 2, 3][..], &[0, 3, 6, 9][..], &[0, 7, 14, 21][..])
);
assert!(image.alpha.iter().all(|value| *value == u8::MAX));
}