summaryrefslogtreecommitdiff
path: root/vendor/ryu/tests/common_test.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-15 16:37:08 -0600
committermo khan <mo@mokhan.ca>2025-07-17 16:30:22 -0600
commit45df4d0d9b577fecee798d672695fe24ff57fb1b (patch)
tree1b99bf645035b58e0d6db08c7a83521f41f7a75b /vendor/ryu/tests/common_test.rs
parentf94f79608393d4ab127db63cc41668445ef6b243 (diff)
feat: migrate from Cedar to SpiceDB authorization system
This is a major architectural change that replaces the Cedar policy-based authorization system with SpiceDB's relation-based authorization. Key changes: - Migrate from Rust to Go implementation - Replace Cedar policies with SpiceDB schema and relationships - Switch from envoy `ext_authz` with Cedar to SpiceDB permission checks - Update build system and dependencies for Go ecosystem - Maintain Envoy integration for external authorization This change enables more flexible permission modeling through SpiceDB's Google Zanzibar inspired relation-based system, supporting complex hierarchical permissions that were difficult to express in Cedar. Breaking change: Existing Cedar policies and Rust-based configuration will no longer work and need to be migrated to SpiceDB schema.
Diffstat (limited to 'vendor/ryu/tests/common_test.rs')
-rw-r--r--vendor/ryu/tests/common_test.rs91
1 files changed, 0 insertions, 91 deletions
diff --git a/vendor/ryu/tests/common_test.rs b/vendor/ryu/tests/common_test.rs
deleted file mode 100644
index e2bc4e1d..00000000
--- a/vendor/ryu/tests/common_test.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Translated from C to Rust. The original C code can be found at
-// https://github.com/ulfjack/ryu and carries the following license:
-//
-// Copyright 2018 Ulf Adams
-//
-// The contents of this file may be used under the terms of the Apache License,
-// Version 2.0.
-//
-// (See accompanying file LICENSE-Apache or copy at
-// http://www.apache.org/licenses/LICENSE-2.0)
-//
-// Alternatively, the contents of this file may be used under the terms of
-// the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE-Boost or copy at
-// https://www.boost.org/LICENSE_1_0.txt)
-//
-// Unless required by applicable law or agreed to in writing, this software
-// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.
-
-#![allow(dead_code)]
-#![allow(
- clippy::approx_constant,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::excessive_precision,
- clippy::unreadable_literal,
- clippy::wildcard_imports
-)]
-
-#[path = "../src/common.rs"]
-mod common;
-
-use common::{ceil_log2_pow5, decimal_length9, log10_pow2, log10_pow5};
-
-#[test]
-fn test_decimal_length9() {
- assert_eq!(1, decimal_length9(0));
- assert_eq!(1, decimal_length9(1));
- assert_eq!(1, decimal_length9(9));
- assert_eq!(2, decimal_length9(10));
- assert_eq!(2, decimal_length9(99));
- assert_eq!(3, decimal_length9(100));
- assert_eq!(3, decimal_length9(999));
- assert_eq!(9, decimal_length9(999999999));
-}
-
-#[test]
-fn test_ceil_log2_pow5() {
- assert_eq!(1, ceil_log2_pow5(0));
- assert_eq!(3, ceil_log2_pow5(1));
- assert_eq!(5, ceil_log2_pow5(2));
- assert_eq!(7, ceil_log2_pow5(3));
- assert_eq!(10, ceil_log2_pow5(4));
- assert_eq!(8192, ceil_log2_pow5(3528));
-}
-
-#[test]
-fn test_log10_pow2() {
- assert_eq!(0, log10_pow2(0));
- assert_eq!(0, log10_pow2(1));
- assert_eq!(0, log10_pow2(2));
- assert_eq!(0, log10_pow2(3));
- assert_eq!(1, log10_pow2(4));
- assert_eq!(496, log10_pow2(1650));
-}
-
-#[test]
-fn test_log10_pow5() {
- assert_eq!(0, log10_pow5(0));
- assert_eq!(0, log10_pow5(1));
- assert_eq!(1, log10_pow5(2));
- assert_eq!(2, log10_pow5(3));
- assert_eq!(2, log10_pow5(4));
- assert_eq!(1831, log10_pow5(2620));
-}
-
-#[test]
-fn test_float_to_bits() {
- assert_eq!(0, 0.0_f32.to_bits());
- assert_eq!(0x40490fda, 3.1415926_f32.to_bits());
-}
-
-#[test]
-fn test_double_to_bits() {
- assert_eq!(0, 0.0_f64.to_bits());
- assert_eq!(
- 0x400921FB54442D18,
- 3.1415926535897932384626433_f64.to_bits(),
- );
-}