MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / test_case

Function test_case

src/sql-server-util/src/inspect.rs:1027–1038  ·  view source on GitHub ↗
(ddl_command: &str, included_columns: &[Arc<str>], expected: bool)

Source from the content-addressed store, hash-verified

1025 #[mz_ore::test]
1026 fn test_ddl_event_is_compatible() {
1027 fn test_case(ddl_command: &str, included_columns: &[Arc<str>], expected: bool) {
1028 let ddl_event = DDLEvent {
1029 lsn: Default::default(),
1030 ddl_command: ddl_command.into(),
1031 };
1032 let result = ddl_event.is_compatible(included_columns);
1033 assert_eq!(
1034 result, expected,
1035 "DDL command '{}' with included_columns {:?} expected to be {}, got {}",
1036 ddl_command, included_columns, expected, result
1037 );
1038 }
1039
1040 let included_columns = vec![Arc::from("col3"), Arc::from("col4"), Arc::from("col4")];
1041

Callers 1

Calls 1

is_compatibleMethod · 0.45

Tested by

no test coverage detected