#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,x,y;
        cin>>n>>x>>y;
        char a[200005];
        int num=0;
        int sum=0;
        for(int i=1;i<=n;i++)
            cin>>a[i],sum+=a[i]-'0';
        long long ans=0;
        int l,r;
        for(int i=1;i<=n;i++)
            if(a[i]=='1')
                {l=i-1;break;}
        for(int i=n;i>=1;i--)
            if(a[i]=='1')
                {r=i+1;break;}
        if(sum==0)
        {
            ans=(n+1)*y+n*x;
            cout<<ans<<endl;
            continue;
        }
        ans+=n*x+2*x;
        ans+=y*l+(n-r+1)*y;
        num+=(l+n-r+1);
        for(int i=l+1;i<=r&&num<n+1;)
        {
            if(a[i]=='1')
            {
                ans+=2*y;
                i++;
                num++;
            }
            else
            {
                ans+=2*y;
                num++;
                int len=i;
                while(a[len]=='0'&&len<=r)
                    len++;
                len=len-i;
                len--;
                num+=len;
                if(2*y*len>2*x+len*y)
                    ans+=x*2+len*y;
                else
                    ans+=y*len*2;
                i=i+len+1;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long long n,x,y;
        cin>>n>>x>>y;
        char a[200005];
        long long sum=0;
        for(int i=1;i<=n;i++)
            cin>>a[i],sum+=a[i]-'0';
        long long ans=0;
        ans=n*x+2*x;
        int l,r;
        for(int i=1;i<=n;i++)
            if(a[i]=='1')
                {l=i-1;break;}
        for(int i=n;i>=1;i--)
            if(a[i]=='1')
                {r=i+1;break;}
        if(sum==0)
        {
            ans=(n+1)*y+n*x;
            cout<<ans<<endl;
            continue;
        }
        ans+=y*l+(n-r+1)*y;
        for(int i=l+1;i<=r;)
        {
            if(a[i]=='1')
            {
                ans+=2*y;
                i++;
            }
            else
            {
                ans+=2*y;
                int len=i;
                while(a[len]=='0'&&len<=r)
                    len++;
                len=len-i;
                len--;
                if(2*y*len>2*x+len*y)
                    ans+=x*2+len*y;
                else
                    ans+=y*len*2;
                i=i+len+1;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,x,y;
        cin>>n>>x>>y;
        char a[200005];
        int sum=0;
        for(int i=1;i<=n;i++)
            cin>>a[i],sum+=a[i]-'0';
        long long ans=0;
        ans+=n*x+2*x;
        int l,r;
        for(int i=1;i<=n;i++)
            if(a[i]=='1')
                {l=i-1;break;}
        for(int i=n;i>=1;i--)
            if(a[i]=='1')
                {r=i+1;break;}
        if(sum==0)
        {
            ans=(n+1)*y+2*x;
            cout<<ans<<endl;
            continue;
        }
        ans+=y*l+(n-r+1)*y;
        for(int i=l+1;i<=r;)
        {
            if(a[i]=='1')
            {
                ans+=2*y;
                i++;
            }
            else
            {
                ans+=2*y;
                int len=i;
                while(a[len]=='0'&&len<=r)
                    len++;
                len=len-i;
                len--;
                if(2*y*len>2*x+len*y)
                    ans+=x*2+len*y;
                else
                    ans+=y*len*2;
                i=i+len+1;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,x,y;
        cin>>n>>x>>y;
        char a[200005];
        int num=0;
        int sum=0;
        for(int i=1;i<=n;i++)
            cin>>a[i],sum+=a[i]-'0';
        long long ans=0;
        int l,r;
        for(int i=1;i<=n;i++)
            if(a[i]=='1')
                {l=i-1;break;}
        for(int i=n;i>=1;i--)
            if(a[i]=='1')
                {r=i+1;break;}
        if(sum==0)
        {
            ans=(n+1)*y+n*x;
            cout<<ans<<endl;
            continue;
        }
        ans+=(n*x+2*x);
        ans+=y*l+(n-r+1)*y;
        num+=(l+n-r+1);
        for(int i=l+1;i<=r&&num<n+1;)
        {
            if(a[i]=='1')
            {
                ans+=2*y;
                i++;
                num++;
            }
            else
            {
                ans+=2*y;
                num++;
                int len=i;
                while(a[len]=='0'&&len<=r)
                    len++;
                len=len-i;
                len--;
                num+=len;
                if(2*y*len>2*x+len*y)
                    ans+=x*2+len*y;
                else
                    ans+=y*len*2;
                i=i+len+1;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,x,y;
        cin>>n>>x>>y;
        char a[200005];
        int sum=0;
        for(int i=1;i<=n;i++)
            cin>>a[i],sum+=a[i]-'0';
        long long ans=0;
        ans+=n*x+2*x;
        int l,r;
        for(int i=1;i<=n;i++)
            if(a[i]=='1')
                {l=i-1;break;}
        for(int i=n;i>=1;i--)
            if(a[i]=='1')
                {r=i+1;break;}
        if(sum==0)
        {
            ans=(n+1)*y+n*x;
            cout<<ans<<endl;
            continue;
        }
        ans+=y*l+(n-r+1)*y;
        for(int i=l+1;i<=r;)
        {
            if(a[i]=='1')
            {
                ans+=2*y;
                i++;
            }
            else
            {
                ans+=2*y;
                int len=i;
                while(a[len]=='0'&&len<=r)
                    len++;
                len=len-i;
                len--;
                if(2*y*len>2*x+len*y)
                    ans+=x*2+len*y;
                else
                    ans+=y*len*2;
                i=i+len+1;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
ll dp[200100][2];
char s[200100];
int main()
{
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int n,a,b;
    scanf("%d%d%d", &n, &a, &b);
        scanf("%s", s);
        dp[0][0]=b,dp[0][1]=1e18;
		for(int i=0;i<n;i++)
		{
			if(s[i]=='0')
			{
				dp[i+1][1]=min(dp[i][0]+a*2+2*b,dp[i][1]+a+b*2);
				dp[i+1][0]=min(dp[i][0]+a+b,dp[i][1]+a*2+b);
			}
			else
			{
				dp[i+1][1]=dp[i][1]+a+2*b,dp[i+1][0]=1e18;
			}
		}
		printf("%I64d\n",dp[n][0]);
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
ll dp[200100][2];
char s[200100];
int main()
{
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int n,a,b;
    scanf("%d%d%d", &n, &a, &b);
        scanf("%s", s);
        dp[0][0]=b,dp[0][1]=2*b;
		for(int i=0;i<n;i++)
		{
			if(s[i]=='0')
			{
				dp[i+1][1]=min(dp[i][0]+a*2+2*b,dp[i][1]+a+b*2);
				dp[i+1][0]=min(dp[i][0]+a+b,dp[i][1]+a*2+b);
			}
			else
			{
				dp[i+1][1]=dp[i][1]+a+2*b,dp[i+1][0]=1e18;
			}
		}
		printf("%I64d\n",min(dp[n][0],dp[n][1]));
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
ll dp[200100][2];
char s[200100];
int main()
{
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int n,a,b;
    scanf("%d%d%d", &n, &a, &b);
        scanf("%s", s);
        dp[0][0]=b,dp[0][1]=1e18;
		for(int i=0;i<n;i++)
		{
			if(s[i]=='0')
			{
				dp[i+1][1]=min(dp[i][0]+a*2+2*b,dp[i][1]+a+b*2);
				dp[i+1][0]=min(dp[i][0]+a+b,dp[i][1]+a*2+b);
			}
			else
			{
				dp[i+1][1]=dp[i][1]+a+2*b,dp[i+1][0]=1e18;
			}
		}
		printf("%I64d\n",min(dp[n][0],dp[n][1]));
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		ll int n,a,b;
		cin>>n>>a>>b;

		string s;
		cin>>s;

		ll int cnt=0,cnt1=0,ct=a*s.size();
		vi v,v1;

		ct+=b*(s.size()+1);

		for(int i=0;i<n;i++){
			if(s[i]=='0'){
				if(cnt1!=0)
				v1.pb(cnt1);
				cnt1=0;
				cnt++;
			}

			else if(s[i]=='1'){
				if(cnt!=0)
				v.pb(cnt);
				cnt=0;
				cnt1++;
			}
		}

		if(cnt!=0)
		v.pb(cnt);

		if(cnt1!=0)
		v1.pb(cnt1);

		for(int i=0;i<v1.size();i++){
			ct+=b*(v1[i]+1);
		}

		if(v[0]!=s.size()){
			for(int i=0;i<v.size();i++){
				if(i==0 || i==v.size()-1){
					ct+=a;
				}

				else if(i!=v.size()-1){
					if(2*a>(v[i]-1)*b)
					ct+=(v[i]-1)*b;
					else
					ct+=2*a;
				}
			}
		}

		cout<<ct;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		ll int n,a,b;
		cin>>n>>a>>b;

		int x=((2*a)/b)+1;
		//cout<<x;

		string s;
		cin>>s;

		ll int cnt=0,cnt1=0,ct=a*s.size();
		vi v,v1;

		ct+=b*(s.size()+1);

		for(int i=0;i<n;i++){
			if(s[i]=='0'){
				if(cnt1!=0)
				v1.pb(cnt1);
				cnt1=0;
				cnt++;
			}

			else if(s[i]=='1'){
				if(cnt!=0)
				v.pb(cnt);
				cnt=0;
				cnt1++;
			}
		}

		if(cnt!=0)
		v.pb(cnt);

		if(cnt1!=0)
		v1.pb(cnt1);

		for(int i=0;i<v1.size();i++){
			ct+=b*(v1[i]+1);
		}

		if(v[0]!=s.size()){
			for(int i=0;i<v.size();i++){
				if(i==0){
					ct+=a;
				}

				else if(i!=v.size()-1){
					if(2*a>(v[i]-1)*b)
					ct+=(v[i]-1)*b;
					else
					ct+=2*a;
				}

				else{
					if(a>(v[i])*b)
					ct+=v[i]*b;
					else
					ct+=a;
				}
			}
		}

		cout<<ct;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		ll int n,a,b;
		cin>>n>>a>>b;

		string s;
		cin>>s;

		ll int dp[n][2];
		dp[0][0]=a+b;
		dp[0][1]=INT_MAX;

		for(int i=1;i<n;i++){
			if(s[i]=='0'){
				if(s[i-1]=='0'){
					dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+b);
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
				}

				else{
					dp[i][0]=dp[i-1][1]+2*a+b;
					dp[i][1]=dp[i-1][1]+a+2*b;
				}
			}

			else if(s[i]=='1'){
				if(s[i-1]=='0'){
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
				}

				else{
					dp[i][1]=dp[i-1][1]+a+2*b;
				}
			}
		}

		cout<<dp[n-1][0]+b;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		ll int n,a,b;
		cin>>n>>a>>b;

		string s;
		cin>>s;

		int dp[n][2];
		dp[0][0]=a+b;
		dp[0][1]=INT_MAX;

		for(int i=1;i<n;i++){
			if(s[i]=='0'){
				if(s[i-1]=='0'){
					dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+b);
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
				}

				else{
					dp[i][0]=dp[i-1][1]+2*a+b;
					dp[i][1]=dp[i-1][1]+a+2*b;
				}
			}

			else if(s[i]=='1'){
				if(s[i-1]=='0'){
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
				}

				else{
					dp[i][1]=dp[i-1][1]+a+2*b;
				}
			}
		}

		cout<<dp[n-1][0]+b;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		int n,a,b;
		cin>>n>>a>>b;

		int x=((2*a)/b)+1;
		//cout<<x;

		string s;
		cin>>s;

		ll int cnt=0,cnt1=0,ct=a*s.size();
		vi v,v1;

		ct+=b*(s.size()+1);

		for(int i=0;i<n;i++){
			if(s[i]=='0'){
				if(cnt1!=0)
				v1.pb(cnt1);
				cnt1=0;
				cnt++;
			}

			else if(s[i]=='1'){
				if(cnt!=0)
				v.pb(cnt);
				cnt=0;
				cnt1++;
			}
		}

		if(cnt!=0)
		v.pb(cnt);

		if(cnt1!=0)
		v1.pb(cnt1);

		for(int i=0;i<v1.size();i++){
			ct+=b*(v1[i]+1);
			//cout<<v1[i]<<" ";
		}

		for(int i=0;i<v.size();i++){
			//cout<<v[i];

			if(i==0 && i!=v.size()-1){
				ct+=a;
				continue;
			}

			if(i==0 && s.size()==v[0])
			break;

			else{
				if(v[i]>=x){
					if(i==v.size()-1)
					ct+=a;

					else
					ct+=2*a;
				}

				else{
					if(i==v.size()-1)
					ct+=b*(v[i]);

					else
					ct+=b*(v[i]-1);
				}
			}
		}

		cout<<ct;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		ll int n,a,b;
		cin>>n>>a>>b;

		string s;
		cin>>s;

		ll int dp[n][2];
		dp[0][0]=a+b;
		dp[0][1]=INT_MAX;

		for(int i=1;i<n;i++){
			if(s[i]=='0'){
				if(s[i-1]=='0'){
					dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+b);
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
				}

				else{
					dp[i][0]=dp[i-1][1]+2*a+2*b;
					dp[i][1]=dp[i-1][1]+a+2*b;
				}
			}

			else if(s[i]=='1'){
				if(s[i-1]=='0'){
					dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
					dp[i][0]=INT_MAX;
				}

				else{
					dp[i][1]=dp[i-1][1]+a+2*b;
					dp[i][0]=INT_MAX;
				}
			}
		}

		cout<<dp[n-1][0]+b;
		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);#define ldb long double
#define db double
#define str string

#define fr first
#define se second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define mp make_pair

#define pi pair<int,int>
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define pldb pair<ldb,ldb>

#define vi vector<int>
#define vll vector<ll>
#define vdb vector<db>
#define vldb vector<ldb>
#define vpi vector< pi >
#define vpll vector< pll >

#define mi map<int,int>
#define mll map<ll,ll>
#define mdb map<db,db>
#define mldb map<ldb,ldb>
using namespace std;

int main(){
	int t;
	cin>>t;

	while(t--){
		int n,a,b;
		cin>>n>>a>>b;

		int x=((2*a)/b)+1;
		//cout<<x;

		string s;
		cin>>s;

		ll int cnt=0,cnt1=0,ct=a*s.size();
		vi v,v1;

		ct+=b*(s.size()+1);

		for(int i=0;i<n;i++){
			if(s[i]=='0'){
				if(cnt1!=0)
				v1.pb(cnt1);
				cnt1=0;
				cnt++;
			}

			else if(s[i]=='1'){
				if(cnt!=0)
				v.pb(cnt);
				cnt=0;
				cnt1++;
			}
		}

		if(cnt!=0)
		v.pb(cnt);

		if(cnt1!=0)
		v1.pb(cnt1);

		for(int i=0;i<v1.size();i++){
			ct+=b*(v1[i]+1);
			//cout<<v1[i]<<" ";
		}

		if(v[0]!=s.size()){
			for(int i=0;i<v.size();i++){
				if(i==0){
					ct+=a;
				}

				else if(i!=v.size()-1){
					if(2*a>(v[i]-1)*b)
					ct+=(v[i]-1)*b;
					else
					ct+=2*a;
				}

				else{
					if(a>(v[i])*b)
					ct+=v[i]*b;
					else
					ct+=a;
				}
			}
		}

		cout<<ct;
		cout<<"\n";
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();

    int t;cin>>t;

    while(t--){

        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];

        for(int i=0;i<n+1;i++){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }

        //You start from level 0
        dp[0][0]=b;

        for0(n+1){

            if(s[i]=='0'){

                // Reaching bottom from bottom
                int pos1= dp[i][0]+a+b;

                // Reaching bottom from top
                int pos2= dp[i][1]+2*a+b;

                // Reaching top from bottom
                int pos3= dp[i][0] + 2*a + 2*b;

                // Reaching top from top
                int pos4= dp[i][1] + a+2*b;

                // Best way to reach top
                dp[i+1][1]=min(pos3,pos4);

                // Best way to reach bottom
                dp[i+1][0]=min(pos1,pos2);

            }else{

                // Reach Top From Top
                dp[i+1][1]=dp[i][1]+a+2*b;

            }

        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }
        dp[0][0]=b;
        for0(n+1){
            if(s[i]=='0'){
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][0] + a + b);
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][0] + 2LL * (a + b));
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2LL * b);
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][1] + 2LL * a + b);
            }else{
                dp[i + 1][1] =dp[i][1] + a + 2LL * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }
        dp[0][0]=b;
        dp[0][1]=2*b;
        for0(n){
            if(s[i]=='0'){
                int pos1 = dp[i][0] + a + b;
                int pos2 = dp[i][0] + 2 * (a + b);
                int pos3 = dp[i][1] + a + 2 * b;
                int pos4 = dp[i][1] + 2 * a + b;
                dp[i + 1][0]= min(pos1,pos4);
                dp[i + 1][1]= min(pos2,pos3);
            }else{
                dp[i + 1][1] =dp[i][1] + a + 2 * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        cpp_int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX;
            dp[i][1]=LLONG_MAX;
        }
        dp[0][0]=b;
        for0(n+1){
            if(s[i]=='0'){
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][0] + a + b);
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][0] + 2 * (a + b));
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2 * b);
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][1] + 2 * a + b);
            }else{
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2 * b);
            }
            dispgrid(dp,n+1,2)
            NL
            pf(i+1)
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        dp[0][0]=b;
        dp[0][1]=2*b;
        for0(n){
            if(s[i]=='0'){
                int pos1 = dp[i][0] + a + b;
                int pos2 = dp[i][0] + 2 * (a + b);
                int pos3 = dp[i][1] + a + 2 * b;
                int pos4 = dp[i][1] + 2 * a + b;
                dp[i + 1][0]= min(pos1,pos4);
                dp[i + 1][1]= min(pos2,pos3);
            }else{
                dp[i + 1][0] = LLONG_MAX - LONG_MAX;
                dp[i + 1][1] = dp[i][1] + a + 2 * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }
        dp[0][0]=b;
        dp[0][1]=2*b;
        for0(n){
            if(s[i]=='0'){
                int pos1 = dp[i][0] + a + b;
                int pos2 = dp[i][0] + 2 * (a + b);
                int pos3 = dp[i][1] + a + 2 * b;
                int pos4 = dp[i][1] + 2 * a + b;
                dp[i + 1][0]= min(pos1,pos4);
                dp[i + 1][1]= min(pos2,pos3);
            }else{
                dp[i + 1][1] =dp[i][1] + a + 2 * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LONG_MAX;
            dp[i][1]=LONG_MAX;
        }
        dp[0][0]=b;
        for0(n+1){
            if(s[i]=='0'){
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][0] + a + b);
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][0] + 2 * (a + b));
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2 * b);
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][1] + 2 * a + b);
            }else{
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2 * b);
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }
        dp[0][0]=b;
        for0(n+1){
            if(s[i]=='0'){
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][0] + a + b);
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][0] + 2LL * (a + b));
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2LL * b);
                dp[i + 1][0] = min(dp[i + 1][0], dp[i][1] + 2LL * a + b);
            }else{
                dp[i + 1][1] = min(dp[i + 1][1], dp[i][1] + a + 2LL * b);
            }

        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        for0(n+1){
            dp[i][0]=LLONG_MAX-LONG_MAX;
            dp[i][1]=LLONG_MAX-LONG_MAX;
        }
        dp[0][0]=b;
        for0(n){
            if(s[i]=='0'){
                int pos1 = dp[i][0] + a + b;
                int pos2 = dp[i][0] + 2 * (a + b);
                int pos3 = dp[i][1] + a + 2 * b;
                int pos4 = dp[i][1] + 2 * a + b;
                dp[i + 1][0]= min(pos1,pos4);
                dp[i + 1][1]= min(pos2,pos3);
            }else{
                dp[i + 1][1] =dp[i][1] + a + 2 * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define int long long
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define Check cout<<"Check"<<endl;
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define endl "\n"
#define elif else if
#define NL cout<<'\n';
#define disp(x) for(int t : x )cout<<t<<" ";
#define for0(n) for(int i=0;i<n;i++)
#define form(i,n,cond) for(i=n;i>=0&&cond;i--)
#define SS <<" "<<
#define mp make_pair
#define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define pf(x) cout<<x<<endl;
#define gridin(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cin>>num[i][j];}
#define dispgrid(num,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++) cout<<num[i][j]<<" "; cout<<endl;}
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
const int MOD=1000000007;

void FASTIO(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    #endif
}
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
            return os << "(" << p.first << ", " << p.second << ")";
}
template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
            os << "{";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "}";
}
template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << *it;
                                            }
                    return os << "]";
}
template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
            os << "[";
                for(auto it = v.begin(); it != v.end(); ++it) {
                                if( it != v.begin() ) os << ", ";
                                        os << it -> first << " = " << it -> second ;
                                            }
                    return os << "]";
}
//################  SMALL FUNCTION ####################//
unordered_map<int,bool> memo_p;

inline int gcd(int a, int b){ return __gcd(a,b);}
inline int lcm(int a, int b){return (a*b)/gcd(a, b);}
inline bool isPerfectSquare(int x){ int s = sqrt(x); return (s*s == x);}
inline bool isFibonacci(int n){return isPerfectSquare(5*n*n + 4) || isPerfectSquare(5*n*n - 4);}
inline bool isVowel(char a){if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')return true;return false;}
void init(int *a){
    memset(a,0,sizeof(a));
    return;
}
int gcdExtended(int a, int b, int *x, int *y);
int modInverse(int a, int m){
    int x, y, g = gcdExtended(a, m, &x, &y);
    if (g != 1)
        return -1;
    else{
        int res = (x%m + m) % m;
        return res;
    }
}

int gcdExtended(int a, int b, int *x, int *y) {
    if (a == 0){ *x = 0, *y = 1;  return b;}
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int modpow(int x, unsigned int y, int p){
    int res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n){
    if(memo_p.find(n)!=memo_p.end()){
        return memo_p[n];
    }
    bool res;
    if (n < 1){res= false;memo_p[n]=res; return res;};if (n <= 3){  res= true;memo_p[n]=res; return res;}
    if (n%2 == 0 || n%3 == 0){res=false;memo_p[n]=res; return res;}
    for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0){res= false;memo_p[n]=res; return res;};
    res= true;
    memo_p[n]=res;
    return res;
}

vi primeFactors(int n){
    if(n==1) return vi(1,1);
    bool idx[1]={false};
    vi res;
    while (n%2 == 0){
        if(!idx[1]){idx[1]=true;res.pb(2);}
        n = n/2;
    }
    for (int i=3;i*i<=n; i+=2){
        bool once=false;
        while (n%i==0){ if(!once){res.pb(i);once=true;} n=n/i; }
    }
    if (n > 2)res.pb(n);
    return res;
}

vi divisors(int n){
    vi res;
    for (int i=1; i<=sqrt(n); i++){
        if (n%i == 0){ if (n/i == i){ res.pb(i); } else{ res.pb(n/i); res.pb(i); } }
    }
    return res;
}

int32_t main(){
    FASTIO();
    int t;cin>>t;
    while(t--){
        int n,a,b;cin>>n>>a>>b;
        string s;cin>>s;
        int dp[n+1][2];
        dp[0][0]=b;
        dp[0][1]=2*b;
        for0(n){
            if(s[i]=='0'){
                int pos1 = dp[i][0] + a + b;
                int pos2 = dp[i][0] + 2 * (a + b);
                int pos3 = dp[i][1] + a + 2 * b;
                int pos4 = dp[i][1] + 2 * a + b;
                dp[i + 1][0]= min(pos1,pos4);
                dp[i + 1][1]= min(pos2,pos3);
            }else{
                dp[i + 1][1] =dp[i][1] + a + 2 * b;
            }
        }
        pf(dp[n][0])
    }
    return 0;
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-23 22:49:25
* @Last Modified by:   Y
* @Last Modified time: 2019-08-23 22:49:25
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 2e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[MAXN];
ll dp[MAXN][2];
//dp[i][0] height=1
//dp[i][1] height=2

int main(){
	int T;
	in(T);
	while(T--){
		int n,a,b;
		in(n);in(a);in(b);
		scanf("%s",s+1);
		fin2(i,1,n-1){
			if(s[i]=='0'){
				dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+2*b);
				// dp[i][1]=dp[i-1][1]+a+2*b;
			}
			else{
				// dp[i][0]=LLINF;
				dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
			}
//			cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
		}
		outllln(dp[n][0]+b);
	}
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-22 23:31:19
* @Last Modified by:   Y
* @Last Modified time: 2019-08-22 23:31:19
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 2e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[MAXN];
ll ans[MAXN];

int main(){
	IOS
	int T;
	in(T);
	while(T--){
		int n;
		ll a,b;
		in(n);inll(a);inll(b);
		scanf("%s",s+1);
		int f=0;
		int cnt=0;
		for(int i=n;i>=1;i--){
			if(s[i]=='1'&&f==0){
				f=i;
			}
			if(s[i]=='0') {ans[i]=cnt;cnt++;}
			else {
				cnt=0;
			}
		}
		ll res=n*a+(n+1)*b;
		//(len-1)*b<2*a
		int height=1;
		int ___=0;
		for(int i=1;i<=n;i++){
			if(i==f){
				___++;
				res+=(___+1)*b+2*a;
				height=1;
			}
			if(s[i]=='1'){
				height=2;
				___++;
			}
			else{
				if(height==1){
					;
				}
				else{
					if(ans[i]*b>2*a){
						height=1;
						res+=(___+1)*b+2*a;
						___=0;
					}
					else{
						___++;
					}
				}
			}
		}
		outllln(res);
	}
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-24 13:44:41
* @Last Modified by:   Y
* @Last Modified time: 2019-08-24 13:44:41
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 1e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[55][55];
char ss[55][55];

vector<int> vec;

int main(){
	int n,m;
	fin2(i,1,n){
		scanf("%s",s[i]+1);
	}
	fin2(i,1,n){
		fin2(j,1,n){
			if(s[i][j]=='1'&&s[i][j+1]=='1'&&s[i+1][j]=='1'&&s[i+1][j+1]=='1'){
				vec.push_back(mk(i,j));
				ss[i][j]=ss[i][j+1]=ss[i+1][j]=ss[i+1][j+1]='1';
			}
		}
	}
	fin2(i,1,n){
		fin2(j,1,n){
			if(s[i][j]=='1'&&ss[i][j]!='1'){
				outln(-1);
				return 0;
			}
		}
	}
	outln(vec.size());
	for(auto e:vec){
		printf("%d %d\n",e.first,e.second);
	}
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-22 23:31:19
* @Last Modified by:   Y
* @Last Modified time: 2019-08-22 23:31:19
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 2e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[MAXN];
ll ans[MAXN];

int main(){
	int T;
	in(T);
	while(T--){
		memset(s,0,sizeof(s));
		int n;
		ll a,b;
		in(n);inll(a);inll(b);
		scanf("%s",s+1);
		int f=0;
		int cnt=0;
		for(int i=n;i>=1;i--){
			if(s[i]=='1'&&f==0){
				f=i;
			}
			if(s[i]=='0') {ans[i]=cnt;cnt++;}
			else {
				cnt=0;
			}
		}
		ll res=1ll*n*a+1ll*(n+1)*b;
		//(len-1)*b<2*a
		int height=1;
		ll ___=0;
		for(int i=1;i<=n;i++){
			if(i==f){
				___++;
				res+=(___+1)*b+2*a;
				height=1;
				___=0;
			}
			if(s[i]=='1'){
				height=2;
				___++;
			}
			else{
				if(height==1){
					;
				}
				else{
					if(ans[i]*b>2*a){
						height=1;
						res+=((___+1)*b+2*a);
						___=0;
					}
					else{
						___++;
					}
				}
			}
		}
		outllln(res);
	}
}


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-23 22:49:25
* @Last Modified by:   Y
* @Last Modified time: 2019-08-23 22:49:25
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 2e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[MAXN];
ll dp[MAXN][2];
//dp[i][0] height=1
//dp[i][1] height=2

int main(){
	int T;
	in(T);
	while(T--){
		int n,a,b;
		in(n);in(a);in(b);
		scanf("%s",s+1);
		fin2(i,1,n-1){
			if(s[i]=='0'){
				dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+2*b);
				// dp[i][1]=dp[i-1][1]+a+2*b;
			}
			else{
				dp[i][0]=LLINF;

			}
			dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
//			cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
		}
		outllln(dp[n][0]+b);
	}
}


    /*
    * @Author: XiaoBanni
    * @Email:  xjc5069@gmail.com
    * @Date:   2019-08-23 22:49:25
    * @Last Modified by:   Y
    * @Last Modified time: 2019-08-23 22:49:25
    */

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long ll;
    typedef pair<int,int> pint;
    typedef pair<ll,ll> pll;
    typedef priority_queue<int> maxpque;
    typedef priority_queue<int,vector<int>,greater<int> > minpque;
    const int MAXN = 2e5+5;
    const int INF=INT_MAX/2;
    const ll LLINF=9223372036854775807/2;
    #define in(a) scanf("%d",&a)
    #define inll(a) scanf("%lld",&a)
    #define out(a) printf("%d",a)
    #define outll(a) printf("%lld",a)
    #define outln(a) printf("%d\n",a)
    #define outllln(a) printf("%lld\n",a)
    #define fin(i,st,n) for(int i=st;i<n;i++)
    #define fin2(i,st,n) for(int i=st;i<=n;i++)
    #define c(a) cout<<"***"<<a<<endl;
    #define mk make_pair
    #define pb push_back
    #define f first
    #define s second
    #define maxpque(type) priority_queue<type>
    #define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
    #define gcd __gcd
    #define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

    char s[MAXN];
    ll dp[MAXN][2];
    //dp[i][0] height=1
    //dp[i][1] height=2

    int main(){
    	int T;
    	in(T);
    	while(T--){
    		int n,a,b;
    		in(n);in(a);in(b);
    		scanf("%s",s+1);
    		fin2(i,1,n){
    			if(s[i]=='0'){
    				dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+2*b);
    				if(i!=1)dp[i][1]=dp[i-1][1]+a+2*b;
    				else dp[i][1]=LLINF;
    			}
    			else{
    				dp[i][0]=LLINF;
    				dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
    			}
    //			cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
    		}
    		outllln(dp[n][0]+b);
    	}
    }


    /*
    * @Author: XiaoBanni
    * @Email:  xjc5069@gmail.com
    * @Date:   2019-08-23 22:49:25
    * @Last Modified by:   Y
    * @Last Modified time: 2019-08-23 22:49:25
    */

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long ll;
    typedef pair<int,int> pint;
    typedef pair<ll,ll> pll;
    typedef priority_queue<int> maxpque;
    typedef priority_queue<int,vector<int>,greater<int> > minpque;
    const int MAXN = 2e5+5;
    const int INF=INT_MAX/2;
    const ll LLINF=9223372036854775807/2;
    #define in(a) scanf("%d",&a)
    #define inll(a) scanf("%lld",&a)
    #define out(a) printf("%d",a)
    #define outll(a) printf("%lld",a)
    #define outln(a) printf("%d\n",a)
    #define outllln(a) printf("%lld\n",a)
    #define fin(i,st,n) for(int i=st;i<n;i++)
    #define fin2(i,st,n) for(int i=st;i<=n;i++)
    #define c(a) cout<<"***"<<a<<endl;
    #define mk make_pair
    #define pb push_back
    #define f first
    #define s second
    #define maxpque(type) priority_queue<type>
    #define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
    #define gcd __gcd
    #define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

    char s[MAXN];
    ll dp[MAXN][2];
    //dp[i][0] height=1
    //dp[i][1] height=2

    int main(){
    	int T;
    	in(T);
    	while(T--){
    		int n,a,b;
    		in(n);in(a);in(b);
    		scanf("%s",s+1);
    		fin2(i,1,n){
    			if(s[i]=='0'){
    				dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+2*b);
    				if(i!=1)dp[i][1]=dp[i-1][1]+a+2*b;
    			}
    			else{
    				dp[i][0]=LLINF;
    				dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
    			}
    //			cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
    		}
    		outllln(dp[n][0]+b);
    	}
    }


/*
* @Author: XiaoBanni
* @Email:  xjc5069@gmail.com
* @Date:   2019-08-23 22:49:25
* @Last Modified by:   Y
* @Last Modified time: 2019-08-23 22:49:25
*/

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,ll> pll;
typedef priority_queue<int> maxpque;
typedef priority_queue<int,vector<int>,greater<int> > minpque;
const int MAXN = 2e5+5;
const int INF=INT_MAX/2;
const ll LLINF=9223372036854775807/2;
#define in(a) scanf("%d",&a)
#define inll(a) scanf("%lld",&a)
#define out(a) printf("%d",a)
#define outll(a) printf("%lld",a)
#define outln(a) printf("%d\n",a)
#define outllln(a) printf("%lld\n",a)
#define fin(i,st,n) for(int i=st;i<n;i++)
#define fin2(i,st,n) for(int i=st;i<=n;i++)
#define c(a) cout<<"***"<<a<<endl;
#define mk make_pair
#define pb push_back
#define f first
#define s second
#define maxpque(type) priority_queue<type>
#define minpque(type) priority_queue<type,vector<type>,greater<type> > //pay attention that no ',' in type
#define gcd __gcd
#define IOS ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

char s[MAXN];
ll dp[MAXN][2];
//dp[i][0] height=1
//dp[i][1] height=2

int main(){
	int T;
	in(T);
	while(T--){
		int n,a,b;
		in(n);in(a);in(b);
		scanf("%s",s+1);
		fin2(i,1,n){
			if(s[i]=='0'){
				dp[i][0]=min(dp[i-1][0]+a+b,dp[i-1][1]+2*a+2*b);
				dp[i][1]=dp[i-1][1]+a+2*b;
			}
			else{
				dp[i][0]=LLINF;
				dp[i][1]=min(dp[i-1][0]+2*a+2*b,dp[i-1][1]+a+2*b);
			}
//			cout<<dp[i][0]<<" "<<dp[i][1]<<endl;
		}
		outllln(dp[n][0]+b);
	}
}


#include <bits/stdc++.h>
using namespace std;                                                                                // MACROS
typedef long long int                    ll;
typedef unsigned long long int           ull;
typedef vector<int>                      vi;
typedef vector<ll>                       vll;
typedef pair<int,int>	                   pi;
typedef pair<ll,ll>	                     pll;
typedef map<int,int>                     mi;
typedef map<ll,ll>                       mll;
typedef set<int>                         si;
typedef set<ll>                          sll;
typedef multiset<int>                    msi;
typedef multiset<ll>                     msll;
typedef priority_queue<int ,vector<int>, greater<int>> minHeapInt ;
typedef priority_queue<pi  ,vector<pi> , greater<pi>>  minHeapPair ;
#define MEM(a, b)                        memset(a, (b), sizeof(a))
#define INF                              1e18L+1
#define pb                               push_back
#define mp                               make_pair
#define ff                               first
#define ss                               second
#define all(v)                           v.begin(),v.end()
#define f(i,a,b,c)                       for( i=a; i<b;i+=c)
#define rf(i,a,b,c)                      for( i=b-1;i>=a;i-=c)
#define fo(i,n)                          for( i=0; i < n ; i++)
#define debug1(x)                        cout<<#x<<"="<<x<<endl;
#define rfo(i,n)                         for( i=n-1; i >=0 ; i-- )
#define modsum(a,b)                      (a+b>=MODA)?(a+b-MODA):(a+b) ;
#define moddiff(a,b)                     (a-b < 0 ) ? (a-b+MODA) : (a-b);
#define alldec(v)                        v.begin(),v.end(),greater<int>()
#define PI                               3.141592653589793238462643383279500
#define debug2(x,y)                      cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<endl;
#define printarrayline(arr,n)            for(int i=0;i<n;i++) {cout<<arr[i]<<"\n";}
#define fobe(it,v)                       for(auto it = (v).begin(); it!=(v).end(); ++it )
#define printarrayspace(arr,n)           for(int i=0;i<n;i++) {cout<<arr[i]<<" ";} cout<<"\n";
#define debug3(x,y,z)                    cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<endl;
#define debugarray(arr,n)                for(int i=0;i<n;i++) {cout<<"i="<<i<<" arr[i]="<<arr[i]<<"\n";}
#define debug4(x,y,z,w)                  cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<" "<<#w <<"="<<w<<endl;
#define debugmatrix( arr,n,m )           cout<<setw(5*m+8)<<"MATRIX\n\n"; for(int i=0;i<n;i++) { for(int j=0;j<m;j++){cout<<setw(10)<<arr[i][j];} cout<<"\n"; }
const  ll MODA =                         1000000007;
// const  int MODA =                     998244353 ;
vector<ll> primefactors    ;            // used by generatePrimeFactors()                                                                                // ARRAYS/VECTORS
vector<ll> factors         ;            // used by generateFactors()
ll   fact[1025]={}         ;            // used by generateFactorial() & ncr()
bool isPowerTwo(ll x)                   { return (x && !(x & (x - 1))); }                                                                                // FUNCTIONS
bool isSubstring(string s1, string s2)  { if (s1.find(s2) != string::npos) return true; else return false; }
void generateFactorial(ll n)            { fact[0] = 1; for(ll i = 1; i <= n; i++)	fact[i] = (i* 1ll * fact[i - 1]) ; }
void generateFactorialMOD(ll n)         { fact[0] = 1; for(ll i = 1; i <= n; i++)	fact[i] = (i* 1ll * fact[i - 1]) % MODA; }
bool isPrime(ll n)                      { if(n<2) return false; for(ll i=2;i*i<=n;i++) if(n%i==0) return false; return true; } //O(sqrt(n))
ll   power(ll a, ll b)                  {	ll res=1; while(b) {	if(b&1) res=(res*a); a=(a*a); 	b>>=1;	}	return res; }
ll   powerMOD(ll a, ll b)               {	ll res=1; while(b) {	if(b&1) res=(res*a)%MODA; a=(a*a)%MODA; 	b>>=1;	}	return res; }
ll   modi (ll a)                        { ll m=MODA,s=1,p=0;  while(a>1)  {  ll q=a/m,t=m;  m=a%m; a=t; t=p; p=s-q*p; s=t;  } return s>=0 ? s :s+MODA; }
void generatePrimeFactors(ll n)         { primefactors.clear(); for(ll i=2;i*i<=n;i++) { if(n%i==0) { primefactors.pb(i); while(n%i==0)  n=n/i; } } if(n!=1)   primefactors.pb(n); }
ll   ncr(ll n, ll r)                    { if(r==0)return 1;  fact[0]=1; for(int i=1 ; i<=n; i++) fact[i] = fact[i-1]*i%MODA;   return (fact[n]* modi(fact[r]) % MODA *  modi(fact[n-r]) % MODA) % MODA; }
void generateFactors(ll n)              { factors.clear(); for(ll i=2;i*i<=n;i++){ if(n%i==0) { factors.pb(i); if(n/i!=i)factors.pb(n/i); }} factors.pb(1); factors.pb(n); sort(factors.begin(),factors.end()); }
ll   modmul(ll a,ll b)                  { return((a%MODA)*(b%MODA))%MODA;     }
ll   modadd(ll a,ll b)                  { return((a%MODA)+(b%MODA)+MODA)%MODA;}
ll   modsub(ll a,ll b)                  { return((a%MODA)-(b%MODA)+MODA)%MODA;}
//****************************************************************************************************************************

int main()
{ ios_base::sync_with_stdio(false); cin.tie(0);
     ll tc=1;
     cin>>tc;
     while(tc--)
     {
      ll i,j,n,m,a,b; cin>>n>>a>>b;
      string s;cin>>s;
      ll sum=0,flag=1,ans=0,yes=0,oc=0,mini=LONG_MAX,maxi=0;
      ans = a*n + b*(n+1);
      i=0;
      while(i<n)
         {
           if(s[i]=='1')
           {
             yes=1;
             oc++;
             i++;
           }
           else
           {
             if(yes) ans += b*(oc+1);
             oc=0;
             while(s[i]=='0')i++;
           }
         }
        i=0;
        while(i<n)
         {
           if(s[i]=='0')
               {
                 while(s[i]=='0'){i++;sum++;}
               }
           else
           { yes=1;
             if(flag==1)
             {
               flag=0;
               ans += min(sum*b,a);
             }
             else
               ans += max(0LL,min((sum-1)*b,2*a));

             sum=0;
              i++;
           }
         }
           // if(yes==1)
           //   ans+=min(a,(sum)*b);
        cout<<ans<<"\n";
     }
return 0;
}

//****************************************************************************************************************************
// sort(all(a))      ;
// debugarray(a,n)   ;
// printarrays(a,n)  ;
// printarrayn(a,n)  ;