Home / Function/ test_invalid_defs() — tailwindcss Function Reference

test_invalid_defs() — tailwindcss Function Reference

Architecture documentation for the test_invalid_defs() function in types.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  e3d4a70f_09f9_bf38_8713_72fc49bfeb6f["test_invalid_defs()"]
  a0295b4f_3528_4416_d3b7_7457567b9afa["types()"]
  e3d4a70f_09f9_bf38_8713_72fc49bfeb6f -->|calls| a0295b4f_3528_4416_d3b7_7457567b9afa
  a6904cd0_0f49_4d32_df7e_c5cd93c50506["add_def()"]
  e3d4a70f_09f9_bf38_8713_72fc49bfeb6f -->|calls| a6904cd0_0f49_4d32_df7e_c5cd93c50506
  7a7b0b42_3793_d62f_eb5e_1b737e859046["definitions()"]
  e3d4a70f_09f9_bf38_8713_72fc49bfeb6f -->|calls| 7a7b0b42_3793_d62f_eb5e_1b737e859046
  style e3d4a70f_09f9_bf38_8713_72fc49bfeb6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/types.rs lines 581–600

    fn test_invalid_defs() {
        let mut btypes = TypesBuilder::new();
        for tydef in types() {
            btypes.add_def(tydef).unwrap();
        }
        // Preserve the original definitions for later comparison.
        let original_defs = btypes.definitions();
        let bad_defs = vec![
            // Reference to type that does not exist
            "combo:include:html,qwerty",
            // Bad format
            "combo:foobar:html,rust",
            "",
        ];
        for def in bad_defs {
            assert!(btypes.add_def(def).is_err());
            // Ensure that nothing changed, even if some of the includes were valid.
            assert_eq!(btypes.definitions(), original_defs);
        }
    }

Subdomains

Frequently Asked Questions

What does test_invalid_defs() do?
test_invalid_defs() is a function in the tailwindcss codebase.
What does test_invalid_defs() call?
test_invalid_defs() calls 3 function(s): add_def, definitions, types.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free