From 74a6ab6231de70bc2d9d1e8a249c7055b3787f67 Mon Sep 17 00:00:00 2001 From: Softonik Date: Fri, 26 Jan 2024 03:17:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=86=D0=B5=D0=BD=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B9:=20=D0=A1=D1=82=D1=80=D1=83=D0=BA=D1=82=D1=83=D1=80?= =?UTF-8?q?=D0=B0=20=D1=81=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=D0=BC=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/features/app.feature | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pkg/service/features/app.feature b/pkg/service/features/app.feature index 0ef34e7..2b60f65 100644 --- a/pkg/service/features/app.feature +++ b/pkg/service/features/app.feature @@ -131,4 +131,33 @@ this->doSomethingElse(); } void device::doSomethingElse() { } +``` + + Сценарий: Структура с изменением свойства + * Исходник: +``` +package test + +type device struct { + x int + y int +} + +func (d *device) doSomething() { + d.x = 1 + d.x = d.y +} +``` + * Результат: +``` +class device { +public: + int x; + int y; + void doSomething(); +}; +void device::doSomething() { +this->x=1; +this->x=this->y; +} ```