#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 2e18;
const int MAXN = 3e5;
int N;
ll A, B;
string s;
ll dp[MAXN][2];
ll go() {
  cin >> N >> A >> B >> s;
  s += '0';
  dp[0][0] = B;
  dp[0][1] = INF;
  for (int i = 0; i < N; i++) {
    dp[i + 1][0] = dp[i + 1][1] = INF;
    for (int a = 0; a < 2; a++) {
      for (int b = int(max(s[i] - '0', s[i + 1] - '0')); b < 2; b++) {
        dp[i + 1][b] =
            min(dp[i + 1][b], dp[i][a] + A + A * abs(a - b) + (b + 1) * B);
      }
    }
  }
  return dp[N][0];
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    cout << go() << '\n';
  }
  return 0;
}
