From 24777c335a85209e344fb2b61a60c7768165c747 Mon Sep 17 00:00:00 2001
From: Rich Harris
bindings undefined:
readonly: readonlyWithDefault: 1 binding: - bindingWithDefault: 1
- +bindings defined:
readonly: 0 readonlyWithDefault: 0 binding: 0 - bindingWithDefault: 0
@@ -50,19 +46,13 @@ export default test({ readonly_undefined: readonlyWithDefault_undefined: binding_undefined: - bindingWithDefault_undefined: readonly_defined: 0 readonlyWithDefault_defined: 0 binding_defined: 0 - bindingWithDefault_defined: 0 bind_readonly_undefined: - bind_readonlyWithDefault_undefined: 1 bind_binding_undefined: - bind_bindingWithDefault_undefined: 1 bind_readonly_defined: 0 - bind_readonlyWithDefault_defined: 0 bind_binding_defined: 0 - bind_bindingWithDefault_defined: 0 @@ -93,64 +83,54 @@ export default test({ `props undefined:
- readonly: + readonly: readonlyWithDefault: 1 binding: - bindingWithDefault:
- +props defined:
readonly: 0 readonlyWithDefault: 0 binding: - bindingWithDefault:
- +bindings undefined:
readonly: readonlyWithDefault: 1 binding: - bindingWithDefault:
- +bindings defined:
readonly: 0 readonlyWithDefault: 0 binding: - bindingWithDefault:
- +Main: readonly_undefined: readonlyWithDefault_undefined: binding_undefined: - bindingWithDefault_undefined: readonly_defined: 0 readonlyWithDefault_defined: 0 binding_defined: 0 - bindingWithDefault_defined: 0 bind_readonly_undefined: - bind_readonlyWithDefault_undefined: 1 bind_binding_undefined: - bind_bindingWithDefault_undefined: bind_readonly_defined: 0 - bind_readonlyWithDefault_defined: 0 bind_binding_defined: - bind_bindingWithDefault_defined:
- + ` @@ -169,61 +149,51 @@ export default test({ readonly: readonlyWithDefault: 1 binding: 5 - bindingWithDefault: 5 - +props defined:
readonly: 0 readonlyWithDefault: 0 binding: 5 - bindingWithDefault: 5
- +bindings undefined:
readonly: readonlyWithDefault: 1 binding: 5 - bindingWithDefault: 5
- +bindings defined:
readonly: 0 readonlyWithDefault: 0 binding: 5 - bindingWithDefault: 5
- +Main: readonly_undefined: readonlyWithDefault_undefined: binding_undefined: - bindingWithDefault_undefined: readonly_defined: 0 readonlyWithDefault_defined: 0 binding_defined: 0 - bindingWithDefault_defined: 0 bind_readonly_undefined: - bind_readonlyWithDefault_undefined: 1 bind_binding_undefined: 5 - bind_bindingWithDefault_undefined: 5 bind_readonly_defined: 0 - bind_readonlyWithDefault_defined: 0 bind_binding_defined: 5 - bind_bindingWithDefault_defined: 5
- + ` @@ -239,61 +209,51 @@ export default test({ readonly: 10 readonlyWithDefault: 10 binding: 10 - bindingWithDefault: 10 - +props defined:
readonly: 10 readonlyWithDefault: 10 binding: 10 - bindingWithDefault: 10
- +bindings undefined:
readonly: 10 readonlyWithDefault: 10 binding: 10 - bindingWithDefault: 10
- +bindings defined:
readonly: 10 readonlyWithDefault: 10 binding: 10 - bindingWithDefault: 10
- +Main: readonly_undefined: 10 readonlyWithDefault_undefined: 10 binding_undefined: 10 - bindingWithDefault_undefined: 10 readonly_defined: 10 readonlyWithDefault_defined: 10 binding_defined: 10 - bindingWithDefault_defined: 10 bind_readonly_undefined: 10 - bind_readonlyWithDefault_undefined: 10 bind_binding_undefined: 10 - bind_bindingWithDefault_undefined: 10 bind_readonly_defined: 10 - bind_readonlyWithDefault_defined: 10 bind_binding_defined: 10 - bind_bindingWithDefault_defined: 10
- + ` @@ -309,61 +269,51 @@ export default test({ readonly: readonlyWithDefault: binding: - bindingWithDefault: - +props defined:
readonly: readonlyWithDefault: binding: - bindingWithDefault:
- +bindings undefined:
readonly: readonlyWithDefault: binding: - bindingWithDefault:
- +bindings defined:
readonly: readonlyWithDefault: binding: - bindingWithDefault:
- +Main: readonly_undefined: readonlyWithDefault_undefined: binding_undefined: - bindingWithDefault_undefined: readonly_defined: readonlyWithDefault_defined: binding_defined: - bindingWithDefault_defined: bind_readonly_undefined: - bind_readonlyWithDefault_undefined: bind_binding_undefined: - bind_bindingWithDefault_undefined: bind_readonly_defined: - bind_readonlyWithDefault_defined: bind_binding_defined: - bind_bindingWithDefault_defined:
- + ` diff --git a/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/inner.svelte b/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/inner.svelte index 80416bd346..9c66d82b7f 100644 --- a/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/inner.svelte +++ b/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/inner.svelte @@ -1,20 +1,17 @@readonly: {readonly} readonlyWithDefault: {readonlyWithDefault} binding: {binding} - bindingWithDefault: {bindingWithDefault}
diff --git a/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/main.svelte b/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/main.svelte index d80295b002..a8793bb953 100644 --- a/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/main.svelte +++ b/packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/main.svelte @@ -4,19 +4,13 @@ let readonly_undefined = $state(); let readonlyWithDefault_undefined = $state(); let binding_undefined = $state(); - let bindingWithDefault_undefined = $state(); let readonly_defined = $state(0); let readonlyWithDefault_defined = $state(0); let binding_defined = $state(0); - let bindingWithDefault_defined = $state(0); let bind_readonly_undefined = $state(); - let bind_readonlyWithDefault_undefined = $state(); let bind_binding_undefined = $state(); - let bind_bindingWithDefault_undefined = $state(); let bind_readonly_defined = $state(0); - let bind_readonlyWithDefault_defined = $state(0); let bind_binding_defined = $state(0); - let bind_bindingWithDefault_defined = $state(0);props undefined:
@@ -24,7 +18,6 @@ readonly={readonly_undefined} readonlyWithDefault={readonlyWithDefault_undefined} binding={binding_undefined} - bindingWithDefault={bindingWithDefault_undefined} />props defined:
@@ -32,23 +25,20 @@ readonly={readonly_defined} readonlyWithDefault={readonlyWithDefault_defined} binding={binding_defined} - bindingWithDefault={bindingWithDefault_defined} />bindings undefined:
bindings defined:
@@ -56,55 +46,37 @@ readonly_undefined: {readonly_undefined} readonlyWithDefault_undefined: {readonlyWithDefault_undefined} binding_undefined: {binding_undefined} - bindingWithDefault_undefined: {bindingWithDefault_undefined} readonly_defined: {readonly_defined} readonlyWithDefault_defined: {readonlyWithDefault_defined} binding_defined: {binding_defined} - bindingWithDefault_defined: {bindingWithDefault_defined} bind_readonly_undefined: {bind_readonly_undefined} - bind_readonlyWithDefault_undefined: {bind_readonlyWithDefault_undefined} bind_binding_undefined: {bind_binding_undefined} - bind_bindingWithDefault_undefined: {bind_bindingWithDefault_undefined} bind_readonly_defined: {bind_readonly_defined} - bind_readonlyWithDefault_defined: {bind_readonlyWithDefault_defined} bind_binding_defined: {bind_binding_defined} - bind_bindingWithDefault_defined: {bind_bindingWithDefault_defined}
diff --git a/packages/svelte/tests/snapshot/samples/svelte-element/_expected/client/index.svelte.js b/packages/svelte/tests/snapshot/samples/svelte-element/_expected/client/index.svelte.js index 55ccb739aa..bd4c1a30a1 100644 --- a/packages/svelte/tests/snapshot/samples/svelte-element/_expected/client/index.svelte.js +++ b/packages/svelte/tests/snapshot/samples/svelte-element/_expected/client/index.svelte.js @@ -6,7 +6,7 @@ import * as $ from "svelte/internal"; export default function Svelte_element($$anchor, $$props) { $.push($$props, true); - let tag = $.prop_source($$props, "tag", 1, 'hr'); + let tag = $.prop_source($$props, "tag", 3, 'hr'); /* Init */ var fragment = $.comment($$anchor); var node = $.child_frag(fragment);